|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH] sg-run-job: Make nested-layer-descend insist on $ok
per-host-ts does nothing if !$ok, so per-host-prep's individual steps
become no-ops if the host prep fails, which prevents blundering on.
But per-host-prep does not throw.
The other call site explicitly avoids calling the recipe script if
!$ok. nested-layer-descend is for calling from within a recipe, so we
need to throw an exception to abort the script, if !$ok.
Reported-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
sg-run-job | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sg-run-job b/sg-run-job
index a2527ca..d9b2e38 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -260,10 +260,11 @@ proc per-host-ts {iffail ident script args} {
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
- global nested_layers_hosts need_xen_hosts
+ global nested_layers_hosts need_xen_hosts ok
lappend nested_layers_hosts $need_xen_hosts
set need_xen_hosts $nested_hosts
per-host-prep
+ if {!$ok} { error "host prep ($nested_hosts) (or something else) failed" }
}
#---------- test recipes ----------
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |