From: Ian Jackson Date: Thu, 8 Oct 2020 16:15:25 +0000 (+0100) Subject: Honour OSSTEST_SIMULATE_FAIL in sg-run-job X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=17cce048d0f0e23492cd4bf47c8f2d55796a594b;p=osstest.git Honour OSSTEST_SIMULATE_FAIL in sg-run-job This is a Tcl list of globs for ., and allows for simulating particular test failures. Signed-off-by: Ian Jackson --- diff --git a/sg-run-job b/sg-run-job index dd76d4f..c64ae02 100755 --- a/sg-run-job +++ b/sg-run-job @@ -406,7 +406,14 @@ proc spawn-ts {iffail testid args} { jobdb::spawn-step-commit $flight $jobinfo(job) $stepno $testid set xprefix {} - if {[var-or-default env(OSSTEST_SIMULATE) 0]} { set xprefix echo } + if {[var-or-default env(OSSTEST_SIMULATE) 0]} { + set xprefix echo + foreach ent [var-or-default env(OSSTEST_SIMULATE_FAIL) {}] { + if {[string match $ent $jobinfo(job).$testid]} { + set xprefix OSSTEST_SIMULATE_FAIL + } + } + } set log [jobdb::step-log-filename $flight $jobinfo(job) $stepno $ts] set redirects {}