From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH] sg-report-flight: New --branches-also option
Date: Thu, 31 Jul 2014 16:29:15 +0100 [thread overview]
Message-ID: <E1XCsJ0-0004RO-86@lists.xen.org> (raw)
This allows easy comparison of relevant flights (specified by tree
versions) from one branch with relevant flights from another.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
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= <<END;
SELECT * FROM (
SELECT flight, blessing FROM flights
- WHERE branch=?
+ WHERE $branches_cond_q
AND $blessingscond
ORDER BY flight DESC
LIMIT 1000
@@ -175,7 +183,7 @@ END
END
#print DEBUG "===\n$flightsq\n===\n";
$flightsq= $dbh_tests->prepare($flightsq);
- $flightsq->execute($branch, @blessings);
+ $flightsq->execute(@blessings);
my $buildflightsq= $dbh_tests->prepare(<<END);
SELECT val FROM runvars
@@ -263,7 +271,9 @@ sub findspecflight () {
SELECT branch FROM flights WHERE flight=?
END
die "$specflight branch ?" unless defined $branch;
+ compute_branches_cond();
} else {
+ compute_branches_cond();
$specflight= findaflight('this', undef,undef,undef,
sub { return undef; });
die unless defined $specflight;
@@ -596,7 +606,7 @@ sub justifyfailures ($;$) {
my $anypassq= <<END;
SELECT * FROM flights JOIN steps USING (flight)
- WHERE branch=?
+ WHERE $branches_cond_q
AND job=? and testid=? and status='pass'
AND $blessingscond
LIMIT 1
@@ -645,7 +655,7 @@ END
next;
}
- $anypassq->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
reply other threads:[~2014-07-31 15:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=E1XCsJ0-0004RO-86@lists.xen.org \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.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).