]> Cypherpunks repositories - gostls13.git/commitdiff
race.bash,race.bat: unset GOROOT_FINAL during tests
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 7 May 2014 06:34:21 +0000 (16:34 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 7 May 2014 06:34:21 +0000 (16:34 +1000)
Just like run.* scripts do.
Fixes race build.

LGTM=dave, dvyukov
R=dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/98980043

src/race.bash
src/race.bat

index 18201f992ce1127a1031260618b31fdc9a630ba9..1680c09e490a194fd862ad3cdf0df2ea85ee2d2b 100755 (executable)
@@ -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
index 64b2f59c158f71f87ead0a440a9efb5ad3b9674d..8858c57b06773341939d1008c8b3324d698872eb 100644 (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