Commit 012fec38 authored by Robert Griesemer's avatar Robert Griesemer

cmd/compile/internal/syntax: don't depend on hardwired $GOROOT name

Fixes #17697.

Change-Id: I3c47e139b09bde81566e29a1ac0ec8c58d55a34a
Reviewed-on: https://go-review.googlesource.com/32539
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: 's avatarMatthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 7c7349c9
...@@ -47,7 +47,6 @@ func TestStdLib(t *testing.T) { ...@@ -47,7 +47,6 @@ func TestStdLib(t *testing.T) {
defer close(results) defer close(results)
for _, dir := range []string{ for _, dir := range []string{
runtime.GOROOT(), runtime.GOROOT(),
//"/Users/gri/src",
} { } {
walkDirs(t, dir, func(filename string) { walkDirs(t, dir, func(filename string) {
if debug { if debug {
...@@ -100,7 +99,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) { ...@@ -100,7 +99,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) {
} }
} else if fi.IsDir() && fi.Name() != "testdata" { } else if fi.IsDir() && fi.Name() != "testdata" {
path := filepath.Join(dir, fi.Name()) path := filepath.Join(dir, fi.Name())
if !strings.Contains(path, "go/test") { if !strings.HasSuffix(path, "/test") {
dirs = append(dirs, path) dirs = append(dirs, path)
} }
} }
......
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