• Brad Fitzpatrick's avatar
    runtime: fix TestFixedGOROOT to properly restore the GOROOT env var after test · 03410f67
    Brad Fitzpatrick authored
    Otherwise subsequent tests won't see any modified GOROOT.
    
    With this CL I can move my GOROOT, set GOROOT to the new location, and
    the runtime tests pass. Previously the crash_tests would instead look
    for the GOROOT baked into the binary, instead of the env var:
    
    --- FAIL: TestGcSys (0.01s)
            crash_test.go:92: building source: exit status 2
                    go: cannot find GOROOT directory: /home/bradfitz/go
    --- FAIL: TestGCFairness (0.01s)
            crash_test.go:92: building source: exit status 2
                    go: cannot find GOROOT directory: /home/bradfitz/go
    --- FAIL: TestGdbPython (0.07s)
            runtime-gdb_test.go:64: building source exit status 2
                    go: cannot find GOROOT directory: /home/bradfitz/go
    --- FAIL: TestLargeStringConcat (0.01s)
            crash_test.go:92: building source: exit status 2
                    go: cannot find GOROOT directory: /home/bradfitz/go
    
    Update #10029
    
    Change-Id: If91be0f04d3acdcf39a9e773a4e7905a446bc477
    Reviewed-on: https://go-review.googlesource.com/10685Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    03410f67
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...