From: Michael Pratt Date: Wed, 22 Feb 2017 01:00:10 +0000 (-0800) Subject: cmd/dist: fix negative test filtering X-Git-Tag: go1.9beta1~1466 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6694a01016e2fb842ee6d8ae053b9c87f56185ff;p=gostls13.git 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 TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index c51dcead2b..fd011e1193 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -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{