From 20d12ba7bcf6be82b2b5d1a1e4bd9f1df43b3a18 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 3 Dec 2019 14:50:06 -0500 Subject: [PATCH] test: disable test results caching with -count flag According to the 'go test' help, "The idiomatic way to disable test caching explicitly is to use -count=1." This removes GOCACHE=off in favor of using -count=1 as GOCACHE=off breaks other tooling including the use of go modules. Signed-off-by: John Mulligan --- entrypoint.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 1cbd3a4..2a43f83 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -63,11 +63,13 @@ else "-covermode=count" \ "-coverprofile=cover.out" \ "-coverpkg=$P/cephfs,$P/rados,$P/rbd") + # disable caching of tests results + testargs+=("-count=1") if [[ ${TEST_RUN} != ALL ]]; then testargs+=("-run" "${TEST_RUN}") fi - GOCACHE=off go test -v "${testargs[@]}" ./... + go test -v "${testargs[@]}" ./... mkdir -p /results/coverage go tool cover -html=cover.out -o /results/coverage/go-ceph.html fi