From 9403bd2990c89837258d3a02a32ecbe6aa87d72c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 7 May 2020 20:36:45 +0100 Subject: [PATCH] test_all: allow -list-retries to be overridden on the command line --- fstest/test_all/run.go | 3 +++ fstest/test_all/test_all.go | 1 + 2 files changed, 4 insertions(+) diff --git a/fstest/test_all/run.go b/fstest/test_all/run.go index 39ffc2d38..083b5eb24 100644 --- a/fstest/test_all/run.go +++ b/fstest/test_all/run.go @@ -336,6 +336,9 @@ func (r *Run) Init() { r.cmdLine = []string{"./" + r.BinaryName()} } r.cmdLine = append(r.cmdLine, prefix+"v", prefix+"timeout", timeout.String(), "-remote", r.Remote) + if *listRetries > 0 { + r.cmdLine = append(r.cmdLine, "-list-retries", fmt.Sprint(*listRetries)) + } r.try = 1 if *verbose { r.cmdLine = append(r.cmdLine, "-verbose") diff --git a/fstest/test_all/test_all.go b/fstest/test_all/test_all.go index f464e1182..7f9644458 100644 --- a/fstest/test_all/test_all.go +++ b/fstest/test_all/test_all.go @@ -42,6 +42,7 @@ var ( urlBase = flag.String("url-base", "https://pub.rclone.org/integration-tests/", "Base for the online version") uploadPath = flag.String("upload", "", "Set this to an rclone path to upload the results here") verbose = flag.Bool("verbose", false, "Set to enable verbose logging in the tests") + listRetries = flag.Int("list-retries", -1, "Number or times to retry listing - set to override the default") ) // if matches then is definitely OK in the shell