}
set nested_layers_hosts {}
- catching-otherwise blocked check-not-blocked
+ catching-otherwise blocked check-not-blocked
if {!$ok} return
if {[llength $need_xen_hosts]} {
if {$ok} { setstatus running }
- if {$ok && ![catch { info args prep-job/$jobinfo(recipe) }]} \
- { catching-otherwise fail prep-job/$jobinfo(recipe) }
+ if {![catch { info args prep-job/$jobinfo(recipe) }]} \
+ { catching-otherwise fail prep-job/$jobinfo(recipe) }
if {$ok} { set syslog [spawn-ts broken = | ts-syslog-server] }
- if {$ok && $need_build_host} \
- { catching-otherwise broken prepare-build-host }
+ if {$need_build_host} { catching-otherwise broken prepare-build-host }
per-host-ts broken host-install/@(*) ts-host-install-twice
per-host-prep
- if {$ok} { catching-otherwise fail run-job/$jobinfo(recipe) }
+ catching-otherwise fail run-job/$jobinfo(recipe)
while 1 {
per-host-finish
}
proc catching-otherwise {failst script} {
+ # Executes $script.
+ # If job is already a failure (ie not $ok), skips it (ie does nothing).
+ # If any Tcl exception is thrown, declares the job a failure.
+ # (ie sets job status to $failst, and sets anyfailed to 1 and ok to 0)
+
global anyfailed flight jobinfo ok
+ if {!$ok} return
+
if {[catch {
uplevel 1 $script
} emsg]} {