diff mbox

[OSSTEST,v1,4/5] mg-show-flight-runvars: include $flight. prefix on job name if -r (recurse)

Message ID 1454336912-28503-4-git-send-email-ian.campbell@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ian Campbell Feb. 1, 2016, 2:28 p.m. UTC
Adds a new -r (==recurse) option which for now only adds "$flight." to
the job name, i.e. nothing is recursive yet.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 mg-show-flight-runvars | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ian Jackson Feb. 1, 2016, 3:19 p.m. UTC | #1
Ian Campbell writes ("[PATCH OSSTEST v1 4/5] mg-show-flight-runvars: include $flight. prefix on job name if -r (recurse)"):
> Adds a new -r (==recurse) option which for now only adds "$flight." to
> the job name, i.e. nothing is recursive yet.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/mg-show-flight-runvars b/mg-show-flight-runvars
index 0cf4e13..f96539f 100755
--- a/mg-show-flight-runvars
+++ b/mg-show-flight-runvars
@@ -27,6 +27,7 @@  csreadconfig();
 
 my $synthcond = '(NOT synth)';
 my $synthsufx = '';
+my $recurse = 0;
 
 for (;;) {
     last unless @ARGV;
@@ -36,6 +37,8 @@  for (;;) {
     if (m/^-a$/) {
 	$synthcond = '(1=1)';
 	$synthsufx = '~';
+    } elsif (m/^-r$/) {
+	$recurse = 1;
     } else {
 	die "$_ ?";
     }
@@ -59,6 +62,7 @@  sub collect ($) {
 
     while (my (@row) = $q->fetchrow_array()) {
 	my $synth = shift @row;
+	$row[0] = "$flight.$row[0]" if $recurse;
 	$row[1] .= $synthsufx if $synth && $synth ne 'f'; # sqlite3 is typeless
 	push @rows, \@row;
     }