[Fuego] [PATCH 10/30] timeout: add a regex match to the format of the timeout
Daniel Sangorrin
daniel.sangorrin at toshiba.co.jp
Mon Jun 4 07:17:44 UTC 2018
Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
engine/scripts/ftc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/engine/scripts/ftc b/engine/scripts/ftc
index cf1af30..c92a1a8 100755
--- a/engine/scripts/ftc
+++ b/engine/scripts/ftc
@@ -1489,6 +1489,8 @@ def do_add_jobs(conf, options):
timeout = options[options.index('-k') + 1]
except IndexError:
error_out('No timeout specified after -k')
+ if re.match('^\d+[dhms]', timeout) is None:
+ error_out('%s: Timeout format not supported.' % timeout)
options.remove('-k')
options.remove(timeout)
test_dict["timeout"] = timeout
--
2.7.4
More information about the Fuego
mailing list