From 657b3a674d1a070af8d4d9ecb5f9fea69aa0704c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 30 Sep 2017 11:07:09 +0100 Subject: [PATCH] fs: fix test_all -clean to run just one cleaning thread per remote --- fs/test_all.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/test_all.go b/fs/test_all.go index 409fa175d..a518b2c41 100644 --- a/fs/test_all.go +++ b/fs/test_all.go @@ -358,9 +358,14 @@ func main() { // start the tests results := make(chan *test, 8) awaiting := 0 + bools := []bool{false, true} + if *clean { + // Don't run -subdir and -fast-list if -clean + bools = bools[:1] + } for _, remote := range remotes { - for _, subdir := range []bool{false, true} { - for _, fastlist := range []bool{false, true} { + for _, subdir := range bools { + for _, fastlist := range bools { if (!subdir || subdir && remote.SubDir) && (!fastlist || fastlist && remote.FastList) { go newTest(remote.Name, subdir, fastlist).run(results) awaiting++