• 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
..
env_test.go Loading commit data...
example_test.go Loading commit data...
exec.go Loading commit data...
exec_posix_test.go Loading commit data...
exec_test.go Loading commit data...
exec_unix.go Loading commit data...
exec_windows.go Loading commit data...
internal_test.go Loading commit data...
lp_plan9.go Loading commit data...
lp_test.go Loading commit data...
lp_unix.go Loading commit data...
lp_unix_test.go Loading commit data...
lp_windows.go Loading commit data...
lp_windows_test.go Loading commit data...