Fixes #37929
Change-Id: I1435411de43aed98f40e0d98e450310b0fdf804c
Reviewed-on: https://go-review.googlesource.com/c/go/+/223924
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
if info.Name() == "vendor" || info.Name() == "testdata" {
return filepath.SkipDir
}
+ if path == filepath.Join(runtime.GOROOT(), "pkg") {
+ // GOROOT/pkg contains generated artifacts, not source code.
+ //
+ // In https://golang.org/issue/37929 it was observed to somehow contain
+ // a module cache, so it is important to skip. (That helps with the
+ // running time of this test anyway.)
+ return filepath.SkipDir
+ }
if info.IsDir() || info.Name() != "go.mod" {
return nil
}