]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: set GOROOT when testing "go install cmd/fix"
authorAndrew Gerrand <adg@golang.org>
Tue, 17 Dec 2013 01:17:56 +0000 (12:17 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 17 Dec 2013 01:17:56 +0000 (12:17 +1100)
This particular test would never pass unless you had GOROOT set in your
environment. This changes makes the test use the baked-in GOROOT, as it
does with GOOS and GOARCH.

R=golang-dev, dave, iant
CC=golang-dev
https://golang.org/cl/43080043

src/cmd/go/test.bash

index f71d678182f4039de521edbf30e08b945a644db2..6c6cb9ed7893b5ed525a525bae3862744b2f6061 100755 (executable)
@@ -36,8 +36,9 @@ stop() {
 ok=true
 allok=true
 
-unset GOPATH
 unset GOBIN
+unset GOPATH
+unset GOROOT
 
 TEST 'file:line in error messages'
 # Test that error messages have file:line information at beginning of
@@ -258,6 +259,7 @@ if [ ! -x $d/gobin/godoc ]; then
 fi
 
 TEST godoc installs into GOROOT
+GOROOT=$(./testgo env GOROOT)
 rm -f $GOROOT/bin/godoc
 ./testgo install code.google.com/p/go.tools/cmd/godoc
 if [ ! -x $GOROOT/bin/godoc ]; then