From 1c6cad2252c208aaf0c1353b79243b04617f97ae Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 29 Nov 2017 13:51:17 +0000 Subject: [PATCH] fs: integration tests: add 30 minute timeout per test --- fs/test_all.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/test_all.go b/fs/test_all.go index 3fc6b1269..5688fa69a 100644 --- a/fs/test_all.go +++ b/fs/test_all.go @@ -135,6 +135,7 @@ var ( runTests = flag.String("remotes", "", "Comma separated list of remotes to test, eg 'TestSwift:,TestS3'") 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") + timeout = flag.Duration("timeout", 30*time.Minute, "Maximum time to run each test for before giving up") ) // test holds info about a running test @@ -155,7 +156,7 @@ func newTest(remote string, subdir bool, fastlist bool) *test { t := &test{ remote: remote, subdir: subdir, - cmdLine: []string{"./" + binary, "-remote", remote}, + cmdLine: []string{"./" + binary, "-test.timeout", (*timeout).String(), "-remote", remote}, try: 1, } if *fstest.Verbose {