1
0
mirror of https://github.com/golang/go synced 2024-11-26 05:07:59 -07:00

[dev.typeparams] test: fix excluded files lookup so it works on Windows

Updates #43866.

Change-Id: I15360de11a48c6f23f25c5ff3a15c117a34127ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/286034
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2021-01-23 11:43:46 -08:00
parent 7947df436d
commit 9456804e86

View File

@ -766,9 +766,10 @@ func (t *test) run() {
// eliminate the flag list.
// Excluded files.
if excluded[t.goFileName()] {
filename := strings.Replace(t.goFileName(), "\\", "/", -1) // goFileName() uses \ on Windows
if excluded[filename] {
if *verbose {
fmt.Printf("excl\t%s\n", t.goFileName())
fmt.Printf("excl\t%s\n", filename)
}
return // cannot handle file yet
}
@ -791,7 +792,7 @@ func (t *test) run() {
} {
if strings.Contains(flag, pattern) {
if *verbose {
fmt.Printf("excl\t%s\t%s\n", t.goFileName(), flags)
fmt.Printf("excl\t%s\t%s\n", filename, flags)
}
return // cannot handle flag
}