• Russ Cox's avatar
    cmd/go: invalidate cached test results if env vars or files change · 29be20a1
    Russ Cox authored
    When we write a cached test result, we now also write a log of the
    environment variables and files inspected by the test run,
    along with a hash of their content. Before reusing a cached test result,
    we recompute the hash of the content specified by the log, and only
    use the result if that content has not changed.
    
    This makes test caching behave correctly for tests that consult
    environment variables or stat or read files or directories.
    
    Fixes #22593.
    
    Change-Id: I8608798e73c90e0c1911a38bf7e03e1232d784dc
    Reviewed-on: https://go-review.googlesource.com/81895
    Run-TryBot: Russ Cox <rsc@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    29be20a1
Name
Last commit
Last update
..
internal/testdeps Loading commit data...
iotest Loading commit data...
quick Loading commit data...
allocs.go Loading commit data...
allocs_test.go Loading commit data...
benchmark.go Loading commit data...
benchmark_test.go Loading commit data...
cover.go Loading commit data...
example.go Loading commit data...
export_test.go Loading commit data...
helper_test.go Loading commit data...
helperfuncs_test.go Loading commit data...
match.go Loading commit data...
match_test.go Loading commit data...
sub_test.go Loading commit data...
testing.go Loading commit data...
testing_test.go Loading commit data...