From: Ian Jackson Date: Tue, 12 Jun 2018 12:17:19 +0000 (+0100) Subject: sg-run-job: Provide new recipe-flag facility X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=4efd1dd7b8327985d6299fa2537db950d2c4be2c;p=people%2Froyger%2Fosstest.git sg-run-job: Provide new recipe-flag facility Individual recipes can now honour modifications requested by setting runvars like recipe_. No callers yet so no functional change. Signed-off-by: Ian Jackson --- diff --git a/sg-run-job b/sg-run-job index 0a3f688..1355876 100755 --- a/sg-run-job +++ b/sg-run-job @@ -160,6 +160,13 @@ proc testid_matches_globs {testid globs} { return 0 } +proc recipe-flag {flagname {def 0}} { + global flight jobinfo + set name "recipe_$flagname" + set val [jobdb::read-runvar $flight $jobinfo(job) $name $def] + return [regexp {true|y|1} $val] +} + #---------- test script handling ---------- # spwan-ts IFFAIL TESTID SCRIPT-ARGS...