From: Robert Griesemer Date: Tue, 1 Nov 2016 22:15:11 +0000 (-0700) Subject: cmd/compile/internal/syntax: don't depend on hardwired $GOROOT name X-Git-Tag: go1.8beta1~392 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=012fec3821d6d01b69a563125fcb7ae49186be81;p=gostls13.git 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 Reviewed-by: Matthew Dempsky TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/syntax/parser_test.go b/src/cmd/compile/internal/syntax/parser_test.go index 3cb12c23d5..0eb9cd5eb3 100644 --- a/src/cmd/compile/internal/syntax/parser_test.go +++ b/src/cmd/compile/internal/syntax/parser_test.go @@ -47,7 +47,6 @@ func TestStdLib(t *testing.T) { defer close(results) for _, dir := range []string{ runtime.GOROOT(), - //"/Users/gri/src", } { walkDirs(t, dir, func(filename string) { if debug { @@ -100,7 +99,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) { } } else if fi.IsDir() && fi.Name() != "testdata" { path := filepath.Join(dir, fi.Name()) - if !strings.Contains(path, "go/test") { + if !strings.HasSuffix(path, "/test") { dirs = append(dirs, path) } }