Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Add -run-only flag to run_all test

Nick Craig-Wood3890105cdcd0
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")
}