Hi all I've just been banging my head why test our linux test env isn't caching tests and found that its down to -exec.

The docs (https://golang.org/cmd/go/#hdr-Build_and_test_caching) refer to cacheable "test" flags but doesn't mention standard non-test flags.

In addition to this GODEBUG=gocachetest=1 reports all cases where it disables caching except when there is a execCmd which simply skips setting -test.testlogfile:
https://github.com/golang/go/blob/master/src/cmd/go/internal/test/test.go#L1107

This was the most frustrating part as it meant hacking the runtime to figure out why caching was not working.

So two question:

1. Is disabling test caching with -exec really intended and why?
2. Would it be acceptable to have to option to cache with -exec?

In terms of background, we use -exec so we change the binary permissions so the tests run correctly, it changes CAP's, without which the test wont run.

    Regards
    Steve

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to