aboutsummaryrefslogtreecommitdiff
path: root/src/race.bash
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2014-05-07 16:34:21 +1000
committerAlex Brainman <alex.brainman@gmail.com>2014-05-07 16:34:21 +1000
commit5d25189d801d7e8bf2fe10ffe95d43dda648a6b0 (patch)
treee784ccfaaac65f830a81a5dfb748940ca16d95cf /src/race.bash
parent77e0f060e39496a4590a88ef91d8202f86773256 (diff)
downloadgo-5d25189d801d7e8bf2fe10ffe95d43dda648a6b0.tar.gz
go-5d25189d801d7e8bf2fe10ffe95d43dda648a6b0.zip
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
Diffstat (limited to 'src/race.bash')
-rwxr-xr-xsrc/race.bash6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/race.bash b/src/race.bash
index 18201f992c..1680c09e49 100755
--- a/src/race.bash
+++ b/src/race.bash
@@ -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