File tree 2 files changed +10
-0
lines changed
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -1859,6 +1859,8 @@ var testlogMagic = []byte("# test log\n") // known to testing/internal/testdeps/
1859
1859
func computeTestInputsID (a * work.Action , testlog []byte ) (cache.ActionID , error ) {
1860
1860
testlog = bytes .TrimPrefix (testlog , testlogMagic )
1861
1861
h := cache .NewHash ("testInputs" )
1862
+ // The runtime always looks at GODEBUG, without telling us in the testlog.
1863
+ fmt .Fprintf (h , "env GODEBUG %x\n " , hashGetenv ("GODEBUG" ))
1862
1864
pwd := a .Package .Dir
1863
1865
for _ , line := range bytes .Split (testlog , []byte ("\n " )) {
1864
1866
if len (line ) == 0 {
Original file line number Diff line number Diff line change @@ -23,6 +23,14 @@ go test testcache -run=TestLookupEnv
23
23
go test testcache -run=TestLookupEnv
24
24
stdout '\(cached\)'
25
25
26
+ # GODEBUG is always read
27
+ env GODEBUG=asdf=1
28
+ go test testcache -run=TestLookupEnv
29
+ ! stdout '\(cached\)'
30
+ go test testcache -run=TestLookupEnv
31
+ stdout '\(cached\)'
32
+ env GODEBUG=
33
+
26
34
env TESTKEY=y
27
35
go test testcache -run=TestLookupEnv
28
36
! stdout '\(cached\)'
You can’t perform that action at this time.
0 commit comments