]> xenbits.xensource.com Git - osstest.git/commitdiff
sg-run-job: support +! for *only* adding things to TESTID
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 21 May 2019 15:43:51 +0000 (16:43 +0100)
committerIan Jackson <iwj@xenproject.org>
Fri, 2 Oct 2020 15:49:13 +0000 (16:49 +0100)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
sg-run-job

index 702ed558e87f7aa94961154822744adc328dfbe5..3ca725e793dc317d3cae41b4943da6a75ad73780 100755 (executable)
@@ -277,6 +277,10 @@ proc recipe-flag {flagname {def 0}} {
 #       subsequent items in SCRIPT-ARGS are added to the expansion of
 #       /@ in TESTID.  (The "+" itself is not added to the arguments
 #       or the testid.)
+#
+#       An argument which is precisely "+!" specifies that the
+#       subsequent items in SCRIPT-ARGS are to be _only_ added to
+#       the expansion of /@ in TESTID, until the next "+".
 
 proc run-ts {iffail args} {
     set wantstatus pass
@@ -343,7 +347,11 @@ proc spawn-ts {iffail testid args} {
             set adding [expr {!$adding}]
             continue
         }
-        lappend real_args $arg
+       if {![string compare +! $arg]} {
+           set adding -1
+           continue
+       }
+        if {$adding>=0} { lappend real_args $arg }
         if {$adding} { lappend testid_args $arg }
     }