From 4efd1dd7b8327985d6299fa2537db950d2c4be2c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 12 Jun 2018 13:17:19 +0100 Subject: [PATCH] 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 --- sg-run-job | 7 +++++++ 1 file changed, 7 insertions(+) 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... -- 2.39.5