From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH] sg-report-flight: New --branches-also option Date: Thu, 31 Jul 2014 16:29:15 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XCsIy-0004RH-M0 for xen-devel@lists.xenproject.org; Thu, 31 Jul 2014 15:30:08 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org This allows easy comparison of relevant flights (specified by tree versions) from one branch with relevant flights from another. Signed-off-by: Ian Jackson --- sg-report-flight | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 4f900c5..4760656 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -34,10 +34,10 @@ use Osstest::Executive; our $specflight; our %specver; -our @blessings; +our (@blessings, @branches_also); our $mro; our $htmldir; -our $branch; +our ($branch, $branches_cond_q); our @allows; our (@includebeginfiles,@includefiles); @@ -58,6 +58,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { $htmldir= $1; } elsif (m/^--blessings?=(.*)$/) { push @blessings, split ',', $1; + } elsif (m/^--branches-also?=(.*)$/) { + push @branches_also, split ',', $1; } elsif (m/^--include-begin=(.*)$/) { push @includebeginfiles, $1; } elsif (m/^--include=(.*)$/) { @@ -135,6 +137,12 @@ sub displayflightnum ($) { } } +sub compute_branches_cond () { + $branches_cond_q = "(".(join ' OR ', + map { "branch='$_'" } + ($branch, @branches_also)).")"; +} + sub findaflight ($$$$$) { my ($thisthat, $exceptflight, $job, $testid, $sub) = @_; @@ -166,7 +174,7 @@ END my $flightsq= <prepare($flightsq); - $flightsq->execute($branch, @blessings); + $flightsq->execute(@blessings); my $buildflightsq= $dbh_tests->prepare(<execute($branch, $j->{job}, $s->{testid}, @blessings); + $anypassq->execute($j->{job}, $s->{testid}, @blessings); if (!$anypassq->fetchrow_hashref()) { print MRO "never-passed $j->{job} $s->{testid} $st\n"; print DEBUG " never passed\n"; -- 1.7.10.4