]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
sg-run-job: testid generation: Introduce $testid_args
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 6 Feb 2015 15:30:38 +0000 (15:30 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 13 Feb 2015 14:01:46 +0000 (14:01 +0000)
Rather than accumulating into host_testid_suffix directly, accumulate
into a list testid_args first.

No functional change: all we do is defer the construction of
host_testid_suffix, which is not used until later in this function.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
sg-run-job

index 68d6c65268bb4a0344e4ec957a9ffbd9f9e3a258..5c192ab631fa393a4720b6db3cd4689b629e07fd 100755 (executable)
@@ -117,19 +117,22 @@ proc spawn-ts {iffail testid ts args} {
 
     set real_args {}
     set adding 1
-    set host_testid_suffix {}
+    set testid_args {}
     foreach arg $args {
         if {![string compare + $arg]} {
             set adding [expr {!$adding}]
             continue
         }
         lappend real_args $arg
-        if {$adding} { append host_testid_suffix "/$arg" }
+        if {$adding} { lappend testid_args $arg }
     }
 
     regsub {^ts-} $ts {} deftestid
     append deftestid /@
 
+    set host_testid_suffix {}
+    foreach arg $testid_args { append host_testid_suffix "/$arg" }
+
     jobdb::spawn-step-begin $flight $jobinfo(job) $ts stepno
 
     if {[string match =* $testid]} {