xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
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	[thread overview]
Message-ID: <1442307646-1316-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1442307620.3549.333.camel@citrix.com>

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 <ian.campbell@citrix.com>
---
 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 <job-spec> <var-spec>
 #   runvar-change <job-spec> <var-spec> <old-value> <new-value>
 #   runvar-perlop <job-spec> <var-spec> <perl-expr>
+#   recipe-set <job-spec> <new-value>
 #   intended-blessing <intended-blessing>
 #
 # <foo-spec>:
@@ -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

  reply	other threads:[~2015-09-15  9:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15  9:00 [PATCH OSSTEST RFC 0/2] simplify testing with adhoc jobs Ian Campbell
2015-09-15  9:00 ` Ian Campbell [this message]
2015-09-15 14:44   ` [PATCH OSSTEST RFC 1/2] cs-adjust-flight: add recipe-set to adjust the recipe for a set of jobs Ian Jackson
2015-09-15  9:00 ` [PATCH OSSTEST RFC 2/2] sg-run-job: support dropping in adhoc test recipes Ian Campbell
2015-09-15 14:44   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1442307646-1316-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).