Commit 34976b98 authored by Francisco Souza's avatar Francisco Souza Committed by Rob Pike

cmd/go: skipping relative paths on go test -i ./...

Fixes #3896.

R=rsc, rogpeppe, r
CC=golang-dev
https://golang.org/cl/6457075
parent 27cb1cbb
...@@ -76,6 +76,12 @@ if ! ./testgo test ./testdata/testimport; then ...@@ -76,6 +76,12 @@ if ! ./testgo test ./testdata/testimport; then
ok=false ok=false
fi 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 # Test tests with relative imports in packages synthesized
# from Go files named on the command line. # from Go files named on the command line.
if ! ./testgo test ./testdata/testimport/*.go; then if ! ./testgo test ./testdata/testimport/*.go; then
......
...@@ -276,7 +276,9 @@ func runTest(cmd *Command, args []string) { ...@@ -276,7 +276,9 @@ func runTest(cmd *Command, args []string) {
all := []string{} all := []string{}
for path := range deps { for path := range deps {
all = append(all, path) if !build.IsLocalImport(path) {
all = append(all, path)
}
} }
sort.Strings(all) sort.Strings(all)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment