From 3890105cdcd0e7bd6153559619dabaeede10afa8 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 25 Feb 2016 22:05:57 +0000 Subject: [PATCH] Add -run-only flag to run_all test --- fs/test_all.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/test_all.go b/fs/test_all.go index 3faf86d39..23b750157 100644 --- a/fs/test_all.go +++ b/fs/test_all.go @@ -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") }