mirror of https://github.com/ceph/go-ceph
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:
parent
5b6bad390a
commit
20d12ba7bc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue