From: Ian Campbell Subject: [PATCH OSSTEST RFC 1/2] cs-adjust-flight: add recipe-set to adjust the recipe for a set of jobs Date: Tue, 15 Sep 2015 10:00:45 +0100 Message-ID: <1442307646-1316-1-git-send-email-ian.campbell@citrix.com> References: <1442307620.3549.333.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1442307620.3549.333.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- cs-adjust-flight | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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; -- 2.5.1