Commit 1561230c authored by Andrew Gerrand's avatar Andrew Gerrand

cmd/go: set GOROOT when testing "go install cmd/fix"

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
parent e962f8f1
...@@ -36,8 +36,9 @@ stop() { ...@@ -36,8 +36,9 @@ stop() {
ok=true ok=true
allok=true allok=true
unset GOPATH
unset GOBIN unset GOBIN
unset GOPATH
unset GOROOT
TEST 'file:line in error messages' TEST 'file:line in error messages'
# Test that error messages have file:line information at beginning of # Test that error messages have file:line information at beginning of
...@@ -258,6 +259,7 @@ if [ ! -x $d/gobin/godoc ]; then ...@@ -258,6 +259,7 @@ if [ ! -x $d/gobin/godoc ]; then
fi fi
TEST godoc installs into GOROOT TEST godoc installs into GOROOT
GOROOT=$(./testgo env GOROOT)
rm -f $GOROOT/bin/godoc rm -f $GOROOT/bin/godoc
./testgo install code.google.com/p/go.tools/cmd/godoc ./testgo install code.google.com/p/go.tools/cmd/godoc
if [ ! -x $GOROOT/bin/godoc ]; then if [ ! -x $GOROOT/bin/godoc ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment