mirror of
https://github.com/golang/go
synced 2024-11-24 16:20:13 -07:00
go/types: skip $GOROOT/src/*.go in TestStdlib
Change-Id: I4a75d98a48675e2beb5b4843fb2c6ff5d4c8d2a2 Reviewed-on: https://go-review.googlesource.com/14769 Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
8caf19c46f
commit
a4b143bc22
@ -266,13 +266,16 @@ func walkDirs(t *testing.T, dir string) {
|
||||
}
|
||||
|
||||
// typecheck package in directory
|
||||
files, err := pkgFilenames(dir)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
return
|
||||
}
|
||||
if files != nil {
|
||||
typecheck(t, dir, files)
|
||||
// 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)
|
||||
return
|
||||
}
|
||||
if files != nil {
|
||||
typecheck(t, dir, files)
|
||||
}
|
||||
}
|
||||
|
||||
// traverse subdirectories, but don't walk into testdata
|
||||
|
Loading…
Reference in New Issue
Block a user