[Fuego] [PATCH 08/30] add-jobs: allow spec and timeout to be always specified

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Mon Jun 4 07:17:42 UTC 2018


The command line values have the highest priority and will
override everything else.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
---
 engine/scripts/ftc | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/engine/scripts/ftc b/engine/scripts/ftc
index d6182e8..4ef790e 100755
--- a/engine/scripts/ftc
+++ b/engine/scripts/ftc
@@ -1469,28 +1469,29 @@ def do_add_jobs(conf, options):
         # FIXTHIS: have add-jobs support wildcards in the test name
         test_name, options = get_test_arg("Add-jobs", conf, options)
         test_dict["testName"] = test_name
-        if '-s' in options:
-            try:
-                spec = options[options.index('-s') + 1]
-            except IndexError:
-                error_out('Testspec not provided after -s.')
-            specnames = get_specs(conf, test_name)
-            if spec not in specnames:
-                error_out('Unknown spec %s' % spec)
-            options.remove('-s')
-            options.remove(spec)
-            test_dict["spec"] = spec
-
-        if '-k' in options:
-            try:
-                timeout = options[options.index('-k') + 1]
-                options.remove('-k')
-            except IndexError:
-                error_out('No timeout specified after -k')
-            test_dict["timeout"] = timeout
     else:
         error_out('No testplan (-p) or test (-t) supplied.')
 
+    if '-s' in options:
+        try:
+            spec = options[options.index('-s') + 1]
+        except IndexError:
+            error_out('Testspec not provided after -s.')
+        specnames = get_specs(conf, test_name)
+        if spec not in specnames:
+            error_out('Unknown spec %s' % spec)
+        options.remove('-s')
+        options.remove(spec)
+        test_dict["spec"] = spec
+
+    if '-k' in options:
+        try:
+            timeout = options[options.index('-k') + 1]
+            options.remove('-k')
+        except IndexError:
+            error_out('No timeout specified after -k')
+        test_dict["timeout"] = timeout
+
     if test_name:
         test = test_class(test_dict)
         for board in boards:
-- 
2.7.4




More information about the Fuego mailing list