From: Ian Campbell Date: Tue, 15 Sep 2015 09:00:45 +0000 (+0100) Subject: cs-adjust-flight: add recipe-set to adjust the recipe for a set of jobs X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dc9e2515b7219bf70d2cbbc2f9a73e47d8551d3e;p=osstest.git cs-adjust-flight: add recipe-set to adjust the recipe for a set of jobs When constructing an adhoc test it may be useful to copy an existing job's configuration but run it with a custom recipe. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- diff --git a/cs-adjust-flight b/cs-adjust-flight index 9e011c6..662b8e9 100755 --- a/cs-adjust-flight +++ b/cs-adjust-flight @@ -12,6 +12,7 @@ # runvar-del # runvar-change # runvar-perlop +# recipe-set # intended-blessing # # : @@ -276,6 +277,21 @@ sub change__runvar_perlop { }, 'IGNORE'); } +sub change__recipe_set { + die unless @changes >= 2; + my $jobs = shift @changes; + my $recipe = shift @changes; + + for_jobs($dstflight, $jobs, sub { + my ($job) = @_; + $dbh_tests->do("UPDATE jobs". + " SET recipe = ?". + " WHERE flight = ? AND job = ?", + {}, $recipe, $dstflight, $job); + verbose "$dstflight $job recipe set to $recipe\n"; + }); +} + sub change__intended_blessing { die unless @changes >= 1; my $blessing = shift @changes;