From 4755e50af8a14ecddac68f8e019407510e8213b3 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Wed, 18 Dec 2019 23:47:26 -0600 Subject: [PATCH] ci: run go race tests in parallel over 8 containers (#16288) * ci: run go race tests in parallel over 8 containers Signed-off-by: Chris Goller * ci: add timing hint for splitting go tests Signed-off-by: Chris Goller * ci: remove spurious grep Signed-off-by: Chris Goller * ci: mod=readonly should ignore unknown internal/promqltests path Signed-off-by: Chris Goller * ci: echo the packages tested Signed-off-by: Chris Goller * ci: remove readonly experiment Signed-off-by: Chris Goller * ci: filter promql internal tests The promql internal tests has a special go.mod that shows up in go list. That directory cannot be tested. Signed-off-by: Chris Goller --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 54a9c2a25b..a1a4231357 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -208,6 +208,7 @@ jobs: GOFLAGS: "-mod=readonly -p=2" # Go on Circle thinks 32 CPUs are available, but there aren't. TEST_RESULTS: /tmp/test-results working_directory: /go/src/github.com/influxdata/influxdb + parallelism: 8 steps: - checkout @@ -227,7 +228,14 @@ jobs: - install_rust_compiler - run: mkdir -p $TEST_RESULTS - run: make test-go # This uses the test cache so it may succeed or fail quickly. - - run: GOTRACEBACK=all GO111MODULE=on FLUX_PARSER_TYPE=rust CGO_LDFLAGS="$(cat .cgo_ldflags)" gotestsum --format standard-quiet --junitfile /tmp/test-results/gotestsum.xml -- -race -count=1 -tags 'libflux' ./... + - run: + name: parallel go race tests + command: | + set +e + # filter internal/promqltests because it has special go.mod + TESTFILES=$(go list ./... | grep -v internal/promqltests | circleci tests split --split-by=timings) + echo $TESTFILES + GOTRACEBACK=all GO111MODULE=on FLUX_PARSER_TYPE=rust CGO_LDFLAGS="$(cat .cgo_ldflags)" gotestsum --format standard-quiet --junitfile /tmp/test-results/gotestsum.xml -- -race -count=1 -tags 'libflux' $TESTFILES - save_cache: name: Saving GOCACHE key: influxdb-gocache-{{ .Branch }}-{{ .Revision }}