From: Shenghou Ma Date: Tue, 20 Mar 2012 16:47:27 +0000 (+0800) Subject: build: unset GOPATH before tests X-Git-Tag: weekly.2012-03-22~31 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=23322ab841c2d6192557a9a0cae3ace40bff8c9d;p=gostls13.git 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 --- 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