mirror of
https://github.com/golang/go
synced 2024-11-18 11:55:01 -07:00
cmd/dist: fix negative test filtering
std and race bench tests fail to check against t.runRxWant, so what should be negative filters act as positive filters. Fixes #19239 Change-Id: Icf02b2192bcd806a162fca9fb0af68a27ccfc936 Reviewed-on: https://go-review.googlesource.com/37336 Run-TryBot: Michael Pratt <mpratt@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
19d2061d50
commit
6694a01016
4
src/cmd/dist/test.go
vendored
4
src/cmd/dist/test.go
vendored
@ -263,7 +263,7 @@ var (
|
||||
|
||||
func (t *tester) registerStdTest(pkg string) {
|
||||
testName := "go_test:" + pkg
|
||||
if t.runRx == nil || t.runRx.MatchString(testName) {
|
||||
if t.runRx == nil || t.runRx.MatchString(testName) == t.runRxWant {
|
||||
stdMatches = append(stdMatches, pkg)
|
||||
}
|
||||
t.tests = append(t.tests, distTest{
|
||||
@ -299,7 +299,7 @@ func (t *tester) registerStdTest(pkg string) {
|
||||
|
||||
func (t *tester) registerRaceBenchTest(pkg string) {
|
||||
testName := "go_test_bench:" + pkg
|
||||
if t.runRx == nil || t.runRx.MatchString(testName) {
|
||||
if t.runRx == nil || t.runRx.MatchString(testName) == t.runRxWant {
|
||||
benchMatches = append(benchMatches, pkg)
|
||||
}
|
||||
t.tests = append(t.tests, distTest{
|
||||
|
Loading…
Reference in New Issue
Block a user