diff options
author | Dmitriy Vyukov <dvyukov@google.com> | 2012-11-09 14:00:41 +0400 |
---|---|---|
committer | Dmitriy Vyukov <dvyukov@google.com> | 2012-11-09 14:00:41 +0400 |
commit | 749625497100da0e1f87cac8d9576bb2ba8615fc (patch) | |
tree | 11152e1fb01d16668309b8099691ed162084792d /src/cmd/go/main.go | |
parent | c104bc1d312ff1476a2fe454a5f499ed6d49129e (diff) | |
download | go-749625497100da0e1f87cac8d9576bb2ba8615fc.tar.gz |
cmd/go: fix selection of packages for testing
Currently it works incorrectly if user specifies own build tags
and with race detection (e.g. runtime/race is not selected,
because it contains only test files with +build race).
R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/6814107
Diffstat (limited to 'src/cmd/go/main.go')
-rw-r--r-- | src/cmd/go/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/go/main.go b/src/cmd/go/main.go index 840d584cd..d66be9a27 100644 --- a/src/cmd/go/main.go +++ b/src/cmd/go/main.go @@ -430,7 +430,7 @@ func matchPackages(pattern string) []string { return filepath.SkipDir } - _, err = build.ImportDir(path, 0) + _, err = buildContext.ImportDir(path, 0) if err != nil { return nil } @@ -471,7 +471,7 @@ func matchPackages(pattern string) []string { } have[name] = true - _, err = build.ImportDir(path, 0) + _, err = buildContext.ImportDir(path, 0) if err != nil && strings.Contains(err.Error(), "no Go source files") { return nil } |