You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When 'go test' runs in package list mode, 'go test' caches successful package test results to avoid unnecessary repeated running of tests. To disable test caching, use any test flag or argument other than the cacheable flags. The idiomatic way to disable test caching explicitly is to use -count=1.
But there is no definition of "cacheable flags".
The text was updated successfully, but these errors were encountered:
$ go help test | grep -C2 cacheable
The rule for a match in the cache is that the run involves the same
test binary and the flags on the command line come entirely from a
restricted set of 'cacheable' test flags, defined as -cpu, -list,
-parallel, -run, -short, and -v.
and also in the page you linked, search "cacheable" in the page.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run
go test path/to/my/pkgs/... -failfast
What did you expect to see?
Test results to be cached.
What did you see instead?
Tests results are not cached when the
-failfast
is present.The doc at https://golang.org/cmd/go/#hdr-Testing_flags says:
But there is no definition of "cacheable flags".
The text was updated successfully, but these errors were encountered: