From 5c717978d9eb8d5f3637aea003003250a76f5db7 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Tue, 10 Nov 2015 12:06:57 +0000 Subject: [PATCH 1/3] Run coverage reporting in post test stage, as teardown is run after the other shard has gone away. --- circle.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/circle.yml b/circle.yml index f5839419d..a1e3da259 100644 --- a/circle.yml +++ b/circle.yml @@ -60,9 +60,6 @@ test: post: - test -z "$SECRET_PASSWORD" || (cd $SRCDIR/integration; ./gce.sh destroy): parallel: true - -teardown: - pre: - test "$CIRCLE_NODE_INDEX" != "0" || (cd $SRCDIR; ./tools/cover/gather_coverage.sh ./coverage $SRCDIR/coverage): parallel: true - test "$CIRCLE_NODE_INDEX" != "0" || (goveralls -repotoken $COVERALLS_REPO_TOKEN -coverprofile=$SRCDIR/profile.cov -service=circleci || true): From c0f3a59726ecb6842632fee77c6a28858f617270 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Tue, 10 Nov 2015 12:08:03 +0000 Subject: [PATCH 2/3] Squashed 'tools/' changes from 28c6aa0..1fc4d66 1fc4d66 Make test work on mac. REVERT: 28c6aa0 Make prefix on runner schedule optional. git-subtree-dir: tools git-subtree-split: 1fc4d66fac376fc85b98b3e16c31c46661d6db32 --- runner/runner.go | 7 +------ test | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/runner/runner.go b/runner/runner.go index f09ffcd6d..bfac9c58b 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -138,16 +138,11 @@ func updateScheduler(test string, duration float64) { func getSchedule(tests []string) ([]string, error) { var ( - prefix = os.Getenv("SCHEDULER_PREFIX") - buildNum = os.Getenv("CIRCLE_BUILD_NUM") + testRun = "integration-" + os.Getenv("CIRCLE_BUILD_NUM") shardCount = os.Getenv("CIRCLE_NODE_TOTAL") shardID = os.Getenv("CIRCLE_NODE_INDEX") requestBody = &bytes.Buffer{} - testRun = "integration-" + buildNum ) - if prefix != "" { - testRun = prefix + "-" + buildNum - } if err := json.NewEncoder(requestBody).Encode(schedule{tests}); err != nil { return []string{}, err } diff --git a/test b/test index 7037ee789..9250f6280 100755 --- a/test +++ b/test @@ -63,7 +63,7 @@ for dir in $TESTDIRS; do GO_TEST_ARGS_RUN="$GO_TEST_ARGS" if [ -n "$SLOW" ]; then - COVERPKGS=$( (go list $dir; go list -f '{{join .Deps "\n"}}' $dir | grep -v "vendor" | grep "^$PACKAGE_BASE/") | paste -s -d,) + COVERPKGS=$( (go list $dir; go list -f '{{join .Deps "\n"}}' $dir | grep -v "vendor" | grep "^$PACKAGE_BASE/") | paste -s -d, -) output=$(mktemp $coverdir/unit.XXXXXXXXXX) GO_TEST_ARGS_RUN="$GO_TEST_ARGS -coverprofile=$output -coverpkg=$COVERPKGS" fi From 8d1307764fc7308fe66f4545e2fb7a7aca39d0c5 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Tue, 10 Nov 2015 13:17:37 +0000 Subject: [PATCH 3/3] Update to deal with weave/499d6312b7e6159ab94c116127b9c020fe109118 --- integration/310_container_to_container_edge_test.sh | 2 +- integration/320_container_edge_cross_host_2_test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/integration/310_container_to_container_edge_test.sh b/integration/310_container_to_container_edge_test.sh index dadca51cc..1ff072a74 100755 --- a/integration/310_container_to_container_edge_test.sh +++ b/integration/310_container_to_container_edge_test.sh @@ -4,7 +4,7 @@ start_suite "Test short lived connections between containers" -WEAVE_NO_FASTDP=true weave_on $HOST1 launch +WEAVE_NO_FASTDP=true WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST1 launch scope_on $HOST1 launch weave_on $HOST1 run -d --name nginx nginx weave_on $HOST1 run -d --name client alpine /bin/sh -c "while true; do \ diff --git a/integration/320_container_edge_cross_host_2_test.sh b/integration/320_container_edge_cross_host_2_test.sh index 4e9a7ea51..b424d21e5 100755 --- a/integration/320_container_edge_cross_host_2_test.sh +++ b/integration/320_container_edge_cross_host_2_test.sh @@ -4,8 +4,8 @@ start_suite "Test short lived connections between containers on different hosts" -WEAVE_NO_FASTDP=true weave_on $HOST1 launch $HOST1 $HOST2 -WEAVE_NO_FASTDP=true weave_on $HOST2 launch $HOST1 $HOST2 +WEAVE_NO_FASTDP=true WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST1 launch $HOST1 $HOST2 +WEAVE_NO_FASTDP=true WEAVE_DOCKER_ARGS=$ADD_HOST_ARGS weave_on $HOST2 launch $HOST1 $HOST2 scope_on $HOST1 launch scope_on $HOST2 launch