From: Ian Campbell Subject: [PATCH OSSTEST] cs-adjust-flight: Add job-rename command which applies a perlop to job names Date: Thu, 10 Dec 2015 16:49:27 +0000 Message-ID: <1449766167-27901-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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 My intention was to allow creation of adhoc jobs based on a template but modified e.g. to enable/disable XSM with a sequence something like: ./cs-adjust-flight $flight copy-jobs $template test-foo-xsm ./cs-adjust-flight $flight rename-job test-foo-xsm 's/-xsm$//' ./cs-adjust-flight $flight runvar-set $job enable_xsm false ./cs-adjust-flight ... update %buildjob Signed-off-by: Ian Campbell --- cs-adjust-flight | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/cs-adjust-flight b/cs-adjust-flight index a72cd88..e0638d4 100755 --- a/cs-adjust-flight +++ b/cs-adjust-flight @@ -18,6 +18,7 @@ # intended-blessing # branch-set # job-status +# job-rename # # : # @@ -371,6 +372,29 @@ END }); } +sub change__job_rename { + die unless @changes >= 2; + my $jobs = shift @changes; + my $perlop = shift @changes; + + my $jobq = $dbh_tests->prepare(<prepare(<execute($newjob, $dstflight, $oldjob); + $runvarq->execute($newjob, $dstflight, $oldjob); + }) +} sub changes () { debug("CHANGES...\n"); -- 2.6.1