// 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 -benchtime, -cpu,
-// -list, -parallel, -run, -short, -timeout, -failfast, and -v.
+// -list, -parallel, -run, -short, -timeout, -failfast, -fullpath and -v.
// If a run of go test has any test or non-test flags outside this set,
// the result is not cached. To disable test caching, use any test flag
// or argument other than the cacheable flags. The idiomatic way to disable
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 -benchtime, -cpu,
--list, -parallel, -run, -short, -timeout, -failfast, and -v.
+-list, -parallel, -run, -short, -timeout, -failfast, -fullpath and -v.
If a run of go test has any test or non-test flags outside this set,
the result is not cached. To disable test caching, use any test flag
or argument other than the cacheable flags. The idiomatic way to disable
"-test.short",
"-test.timeout",
"-test.failfast",
- "-test.v":
+ "-test.v",
+ "-test.fullpath":
// These are cacheable.
// Note that this list is documented above,
// so if you add to this list, update the docs too.
go test testcache -run=TestOSArgs -failfast
stdout '\(cached\)'
+# golang.org/issue/64638: that includes the `-fullpath` argument.
+go test testcache -run=TestOSArgs -fullpath
+! stdout '\(cached\)'
+go test testcache -run=TestOSArgs -fullpath
+stdout '\(cached\)'
+
+
# Executables within GOROOT and GOPATH should affect caching,
# even if the test does not stat them explicitly.