From 402af04b44c92dc924c41d1fdcd599458dc32b0d Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Mon, 10 Jul 2017 15:45:31 +1000 Subject: [PATCH] Fix Drone CI Signed-off-by: Sven Dowideit --- netconf/netconf_linux.go | 4 ++-- scripts/ci | 14 ++++++++------ scripts/release | 8 ++++++++ tests/network_test.go | 18 +++++++++--------- 4 files changed, 27 insertions(+), 17 deletions(-) diff --git a/netconf/netconf_linux.go b/netconf/netconf_linux.go index e6a79612..4221f4fe 100755 --- a/netconf/netconf_linux.go +++ b/netconf/netconf_linux.go @@ -176,14 +176,14 @@ func ApplyNetworkConfigs(netCfg *NetworkConfig, userSetHostname, userSetDNS bool //apply network config for _, link := range links { - applyOuter(link, netCfg, wg, userSetHostname, userSetDNS) + applyOuter(link, netCfg, &wg, userSetHostname, userSetDNS) } wg.Wait() return err } -func applyOuter(link netlink.Link, netCfg *NetworkConfig, wg sync.WaitGroup, userSetHostname, userSetDNS bool) { +func applyOuter(link netlink.Link, netCfg *NetworkConfig, wg *sync.WaitGroup, userSetHostname, userSetDNS bool) { log.Debugf("applyOuter(%V, %v)", userSetHostname, userSetDNS) match, ok := findMatch(link, netCfg) if !ok { diff --git a/scripts/ci b/scripts/ci index 4a47b18c..3b9f72ea 100755 --- a/scripts/ci +++ b/scripts/ci @@ -9,10 +9,12 @@ echo TEST ./scripts/test echo VALIDATE ./scripts/validate -echo PREPARE -./scripts/prepare -echo PACKAGE -./scripts/package -echo INTEGRATION-TEST -./scripts/integration-test + +# Drone servers kernel too old, and the integration tests often time out +#echo PREPARE +#./scripts/prepare +#echo PACKAGE +#./scripts/package +#echo INTEGRATION-TEST +#./scripts/integration-test diff --git a/scripts/release b/scripts/release index ade7b715..9b8e3e19 100755 --- a/scripts/release +++ b/scripts/release @@ -9,6 +9,14 @@ export INTEGRATION_TESTS=0 ./scripts/ci +# from scripts/ci +echo PREPARE +./scripts/prepare +echo PACKAGE +./scripts/package +echo INTEGRATION-TEST +./scripts/integration-test + # make generated changelog lastrelease=$(hub release | grep -v rc | head -n1 | tr -d ' \r\n') git log --format="%s: %b" ${lastrelease}..${VERSION} | grep "Merge pull" | sed 's/.*\(#.*\) from .*:\(.*\)/* \1: \2/g' > dist/artifacts/changelog.txt diff --git a/tests/network_test.go b/tests/network_test.go index d9c4d234..6e2c5286 100755 --- a/tests/network_test.go +++ b/tests/network_test.go @@ -233,15 +233,15 @@ func (s *QemuSuite) TestNetworkCmds(c *C) { s.RunQemuWithNetConsole(c, args...) s.NetCheckOutput(c, "pre_cmds\n"+ - "pre_up lo\n"+ - "post_up lo\n"+ - "pre_up eth0\n"+ - "post_up eth0\n"+ - "pre_up eth1\n"+ - "post_up eth1\n"+ - "pre_up eth2\n"+ - "post_up eth2\n"+ - "post_cmds\n", + "pre_up lo\n"+ + "post_up lo\n"+ + "pre_up eth0\n"+ + "post_up eth0\n"+ + "pre_up eth1\n"+ + "post_up eth1\n"+ + "pre_up eth2\n"+ + "post_up eth2\n"+ + "post_cmds\n", Equals, "cat /var/log/net.log", )