[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 10/24] sg-run-job: new run-ts iffail syntax -...
Indicates not to throw a Tcl exception if the step fails. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- sg-run-job | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sg-run-job b/sg-run-job index 8e625d9..4fd7505 100755 --- a/sg-run-job +++ b/sg-run-job @@ -146,9 +146,11 @@ proc testid_matches_globs {testid globs} { #---------- test script handling ---------- -proc run-ts {args} { - set reap [eval spawn-ts $args] - if {![reap-ts $reap]} { error "test script failed" } +proc run-ts {iffail args} { + set wantstatus pass + if {[regsub {^-} $iffail {} iffail]} { set wantstatus * } + set reap [eval [list spawn-ts $iffail] $args] + if {![reap-ts $reap $wantstatus]} { error "test script failed" } } proc repeat-ts {reps testid args} { @@ -261,7 +263,7 @@ proc spawn-ts {iffail testid args} { return [list fh $fh $details] } -proc reap-ts {reap} { +proc reap-ts {reap {wantstatus pass}} { global truncate truncate_globs switch -exact [lindex $reap 0] { @@ -288,7 +290,7 @@ proc reap-ts {reap} { jobdb::logputs stdout "truncating job now as instructed" set truncate 1 } - return [expr {![string compare $result pass]}] + return [string match $wantstatus $result] } #---------- per-host infrastructure (non-build tests only) ---------- -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |