|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [OSSTEST PATCH 44/82] sg-run-job: New @ iffail tag for prep tasks
From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Currently no users sites, so no functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
sg-run-job | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/sg-run-job b/sg-run-job
index 3f44cae7..a074cd42 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -223,12 +223,15 @@ proc recipe-flag {flagname {def 0}} {
#
# IFFAIL can be
#
-# [-][!].
-# [-][!]STATUS
+# [@][-][!].
+# [@][-][!]STATUS
#
# where STATUS is the job/step status to be used if the step
# status is not as expected, and the special meanings are:
#
+# @ Only for per-host-ts: prefix each ident with @
+# to run this script only if the host is `prep'
+# and not if it is `ready'.
# - for run-ts; suprresses exception on failure.
# for per-host-ts; suppresses consequences of failure.
# ! Run this even if the job is being truncated.
@@ -452,8 +455,11 @@ proc reap-ts {reap {wantstatus pass}} {
proc per-host-ts {iffail ident script args} {
global ok truncate need_xen_hosts flight jobinfo
+
+ set isprep [lindex {{} @} [regsub {^\@} $iffail {} iffail]]
- if {![iffail-check $iffail {$ok && !$truncate} iffail_status]} return
+ if {![iffail-check $iffail {$ok && !$truncate} iffail_status]} \
+ return
set awaitl {}
foreach host $need_xen_hosts {
@@ -461,7 +467,7 @@ proc per-host-ts {iffail ident script args} {
if {[string compare $host host]} {
lappend hostargs +! $host
}
- lappend hostargs + $host
+ lappend hostargs + $isprep$host
lappend awaitl [eval spawn-ts $iffail $ident $script $hostargs $args]
}
--
2.20.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |