build: unset GOPATH before tests

This is because we disallow local import for non-local packages, if
GOROOT happens to be under one of GOPATH, then some tests will fail
to build.
Fixes #3337.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5852043
This commit is contained in:
Shenghou Ma 2012-03-21 00:47:27 +08:00
parent 9dbfda5857
commit 23322ab841
2 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,8 @@ set -e
eval $(go env)
unset CDPATH # in case user has it set
unset GOPATH # we disallow local import for non-local packages, if $GOROOT happens
# to be under $GOPATH, then some tests below will fail
# no core files, please
ulimit -c 0

View File

@ -12,6 +12,10 @@ setlocal
set GOBUILDFAIL=0
:: we disallow local import for non-local packages, if %GOROOT% happens
:: to be under %GOPATH%, then some tests below will fail
set GOPATH=
rem TODO avoid rebuild if possible
if x%1==x--no-rebuild goto norebuild