]> Cypherpunks repositories - gostls13.git/commitdiff
build: unset GOPATH before tests
authorShenghou Ma <minux.ma@gmail.com>
Tue, 20 Mar 2012 16:47:27 +0000 (00:47 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Tue, 20 Mar 2012 16:47:27 +0000 (00:47 +0800)
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

src/run.bash
src/run.bat

index 748f6e93f51c23804c5ca1e0228410c3aeccec6f..41ab37e3c2a5e2be6bc9a11267d71a7136b15e4d 100755 (executable)
@@ -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
index 1d5bf60f254ae82664714b066593e208d98a7a6e..c7a1579728773b34b51f3990c94b0c07d2d0d461 100644 (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