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 <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2019-12-03 14:50:06 -05:00 committed by John Mulligan
parent 5b6bad390a
commit 20d12ba7bc
1 changed files with 3 additions and 1 deletions

View File

@ -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