Commit 6694a010 authored by Michael Pratt's avatar Michael Pratt Committed by Brad Fitzpatrick

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 19d2061d
......@@ -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{
......
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