@@ -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
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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)