From: Francisco Souza Date: Wed, 15 Aug 2012 14:32:49 +0000 (-0700) Subject: cmd/go: skipping relative paths on go test -i ./... X-Git-Tag: go1.1rc2~2647 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=34976b985a9e2d29c594daa2dfa4dd21ee4c4bf1;p=gostls13.git cmd/go: skipping relative paths on go test -i ./... Fixes #3896. R=rsc, rogpeppe, r CC=golang-dev https://golang.org/cl/6457075 --- diff --git a/src/cmd/go/test.bash b/src/cmd/go/test.bash index fe186d4bbc..587bcfc1f9 100755 --- a/src/cmd/go/test.bash +++ b/src/cmd/go/test.bash @@ -76,6 +76,12 @@ if ! ./testgo test ./testdata/testimport; then ok=false fi +# Test installation with relative imports. +if ! ./testgo test -i ./testdata/testimport; then + echo "go test -i ./testdata/testimport failed" + ok=false +fi + # Test tests with relative imports in packages synthesized # from Go files named on the command line. if ! ./testgo test ./testdata/testimport/*.go; then diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index 5f40bd64c0..cd9b411e9d 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -276,7 +276,9 @@ func runTest(cmd *Command, args []string) { all := []string{} for path := range deps { - all = append(all, path) + if !build.IsLocalImport(path) { + all = append(all, path) + } } sort.Strings(all)