]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
sg-run-job: nested: Break out nested-hosts-p
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 11 Apr 2016 16:15:50 +0000 (17:15 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 11 Apr 2016 16:39:03 +0000 (17:39 +0100)
We are going to want to test this elsewhere, too.

No functional change.

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

index 3e0f966ce0f929739e84700cf7efbf8e1030d0a2..d1bd124ba1e88c4abda6309074bda7eda173951f 100755 (executable)
@@ -75,7 +75,7 @@ proc run-job {job} {
     while 1 {
        per-host-finish
        
-       if {![llength $nested_layers_hosts]} break
+       if {![nested-hosts-p]} break
 
        per-host-ts . final-poweroff {ts-host-powercycle --power=0}
 
@@ -257,6 +257,11 @@ proc per-host-ts {iffail ident script args} {
     }
 }
 
+proc nested-hosts-p {} {
+    global nested_layers_hosts
+    expr {!![llength nested_layers_hosts]}
+}
+
 proc nested-layer-descend {nested_hosts} {
     # We save need_xen_hosts on a stack in nested_layers_hosts
     # It gets popped again during the cleanup part of run-job