test_all: allow -list-retries to be overridden on the command line

This commit is contained in:
Nick Craig-Wood 2020-05-07 20:36:45 +01:00
parent e098924e61
commit 9403bd2990
2 changed files with 4 additions and 0 deletions

View File

@ -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")

View File

@ -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