so that runtime/race tests are included in the race builder.
Update #14011.
Change-Id: I04ac6e47366fdb1fe84ba89da556c6d38f7d4a47
Reviewed-on: https://go-review.googlesource.com/18686
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
} else {
// Use a format string to only list packages and commands that have tests.
const format = "{{if (or .TestGoFiles .XTestGoFiles)}}{{.ImportPath}}{{end}}"
- cmd := exec.Command("go", "list", "-f", format, "std")
+ cmd := exec.Command("go", "list", "-f", format)
+ if t.race {
+ cmd.Args = append(cmd.Args, "-tags", "race")
+ }
+ cmd.Args = append(cmd.Args, "std")
if !t.race {
cmd.Args = append(cmd.Args, "cmd")
}