Commit a4b143bc authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

go/types: skip $GOROOT/src/*.go in TestStdlib

Change-Id: I4a75d98a48675e2beb5b4843fb2c6ff5d4c8d2a2
Reviewed-on: https://go-review.googlesource.com/14769Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
parent 8caf19c4
......@@ -266,6 +266,8 @@ func walkDirs(t *testing.T, dir string) {
}
// typecheck package in directory
// but ignore files directly under $GOROOT/src (might be temporary test files).
if dir != filepath.Join(runtime.GOROOT(), "src") {
files, err := pkgFilenames(dir)
if err != nil {
t.Error(err)
......@@ -274,6 +276,7 @@ func walkDirs(t *testing.T, dir string) {
if files != nil {
typecheck(t, dir, files)
}
}
// traverse subdirectories, but don't walk into testdata
for _, fi := range fis {
......
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