Print an error if no tests match in runner.
Otherwise it's confusing if you mistype the test name. Change-Id: Idf32081958f85f3b5aeb8993a07f6975c27644f8 Reviewed-on: https://boringssl-review.googlesource.com/7500 Reviewed-by: Emily Stark (Dunn) <estark@google.com> Reviewed-by: David Benjamin <davidben@google.com>
This commit is contained in:
parent
4c34026d12
commit
270f0a7761
@ -5087,11 +5087,17 @@ func main() {
|
|||||||
go worker(statusChan, testChan, *shimPath, &wg)
|
go worker(statusChan, testChan, *shimPath, &wg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var foundTest bool
|
||||||
for i := range testCases {
|
for i := range testCases {
|
||||||
if len(*testToRun) == 0 || *testToRun == testCases[i].name {
|
if len(*testToRun) == 0 || *testToRun == testCases[i].name {
|
||||||
|
foundTest = true
|
||||||
testChan <- &testCases[i]
|
testChan <- &testCases[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if !foundTest {
|
||||||
|
fmt.Fprintf(os.Stderr, "No test named '%s'\n", *testToRun)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
close(testChan)
|
close(testChan)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
Loading…
Reference in New Issue
Block a user