diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2012-03-21 00:47:27 +0800 |
---|---|---|
committer | Shenghou Ma <minux.ma@gmail.com> | 2012-03-21 00:47:27 +0800 |
commit | 23322ab841c2d6192557a9a0cae3ace40bff8c9d (patch) | |
tree | 629922f0ef6efb83431b58c5a5d40eadf5ca6b96 | |
parent | 9dbfda5857ca5481135c960ead3e9bce153cc8b6 (diff) | |
download | go-23322ab841c2d6192557a9a0cae3ace40bff8c9d.tar.gz go-23322ab841c2d6192557a9a0cae3ace40bff8c9d.zip |
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
-rwxr-xr-x | src/run.bash | 2 | ||||
-rw-r--r-- | src/run.bat | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/run.bash b/src/run.bash index 748f6e93f5..41ab37e3c2 100755 --- a/src/run.bash +++ b/src/run.bash @@ -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 diff --git a/src/run.bat b/src/run.bat index 1d5bf60f25..c7a1579728 100644 --- a/src/run.bat +++ b/src/run.bat @@ -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 |