1
0
mirror of https://github.com/golang/go synced 2024-09-29 22:24:33 -06:00

race.bash,race.bat: unset GOROOT_FINAL during tests

Just like run.* scripts do.
Fixes race build.

LGTM=dave, dvyukov
R=dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/98980043
This commit is contained in:
Alex Brainman 2014-05-07 16:34:21 +10:00
parent 77e0f060e3
commit 5d25189d80
2 changed files with 12 additions and 0 deletions

View File

@ -38,5 +38,11 @@ fi
# golang.org/issue/5537 - we must build a race enabled cmd/cgo before trying to use it.
go install -race cmd/cgo
go install -race std
# we must unset GOROOT_FINAL before tests, because runtime/debug requires
# correct access to source code, so if we have GOROOT_FINAL in effect,
# at least runtime/debug test will fail.
unset GOROOT_FINAL
go test -race -short std
go test -race -run=nothingplease -bench=.* -benchtime=.1s -cpu=4 std

View File

@ -36,6 +36,12 @@ go install -race cmd/cgo
echo # go install -race std
go install -race std
if errorlevel 1 goto fail
:: we must unset GOROOT_FINAL before tests, because runtime/debug requires
:: correct access to source code, so if we have GOROOT_FINAL in effect,
:: at least runtime/debug test will fail.
set GOROOT_FINAL=
echo # go test -race -short std
go test -race -short std
if errorlevel 1 goto fail