Add -run-only flag to run_all test

This commit is contained in:
Nick Craig-Wood 2016-02-25 22:05:57 +00:00
parent d2219a800a
commit 3890105cdc

View file

@ -38,6 +38,7 @@ var (
runTests = flag.String("run", "", "Comma separated list of remotes to test, eg 'TestSwift:,TestS3'")
verbose = flag.Bool("verbose", false, "Run the tests with -v")
clean = flag.Bool("clean", false, "Instead of testing, clean all left over test directories")
runOnly = flag.String("run-only", "", "Run only those tests matching the regexp supplied")
)
// test holds info about a running test
@ -62,6 +63,9 @@ func newTest(remote string, subdir bool) *test {
if *verbose {
t.cmdLine = append(t.cmdLine, "-test.v")
}
if *runOnly != "" {
t.cmdLine = append(t.cmdLine, "-test.run", *runOnly)
}
if subdir {
t.cmdLine = append(t.cmdLine, "-subdir")
}