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 03/10] Flight restriction: Update cs-bisection-step
Date: Thu, 23 Jul 2015 19:19:17 +0100 [thread overview]
Message-ID: <1437675564-16602-4-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1437675564-16602-1-git-send-email-ian.jackson@eu.citrix.com>
Use restrictflight_arg and restrictflight_cond.
This entails replacing $maxflight_cond (which is empty or contains a
series of texts each starting with AND) with $restrictflight_cond
(which is actually an expression, and might be just "TRUE").
No functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
cs-bisection-step | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/cs-bisection-step b/cs-bisection-step
index bf41f81..90111ff 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -61,7 +61,6 @@ open DEBUG, ">/dev/null" or die $!;
open SUMMARY, ">/dev/null" or die $!;
our @org_argv= @ARGV;
-our $maxflight_cond= '';
our $basistemplate;
while (@ARGV && $ARGV[0] =~ m/^\-/) {
@@ -84,8 +83,8 @@ while (@ARGV && $ARGV[0] =~ m/^\-/) {
$cache_option= 0;
} elsif (m/^--flight=(\d+)$/) {
$popflight= $1;
- } elsif (m/^--max-flight=(\d+)$/) {
- $maxflight_cond= "AND flights.flight <= $1";
+ } elsif (restrictflight_arg($_)) {
+ # Handled by Executive
} elsif (m/^--(fail|basis)-flight=(\d+)$/) {
$specflights{$1}= $2;
} elsif (m/^--basis-template=(\d+)$/) {
@@ -112,6 +111,7 @@ our (@treeinfos);
# $treeinfos[]{Name}
# $treeinfos[]{Url}
+our $restrictflight_cond= restrictflight_cond();
our $blessingscond= '('.join(" OR ", map { "blessing='$_'" } @blessings).')';
sub psummary ($) {
@@ -313,7 +313,7 @@ sub findbasics () {
AND (status = 'fail' OR status = 'pass')
AND branch = ?
AND $flight_cond{fail}
- $maxflight_cond
+ AND $restrictflight_cond
ORDER BY notbroken DESC, flights.started DESC
END
my $basisq= db_prepare(<<END);
@@ -325,7 +325,7 @@ END
AND branch = ?
AND $flight_is_not_broken
AND $flight_cond{basis}
- $maxflight_cond
+ AND $restrictflight_cond
ORDER BY blessing, flights.started DESC
END
@@ -567,7 +567,7 @@ END
AND flights.started >= $basispass_date
AND branch = ?
AND $flight_is_not_broken
- $maxflight_cond
+ AND $restrictflight_cond
");
$jobq->execute($job,$branch);
while (my $jobrow= $jobq->fetchrow_hashref()) {
@@ -1106,7 +1106,7 @@ END
WHERE j.job=?
AND j.status='pass'
AND $blessingscond
- $maxflight_cond
+ AND $restrictflight_cond
AND 0 = ( SELECT count(*)
FROM
( SELECT name,val
@@ -1228,7 +1228,8 @@ END
# one side is NULL (runvar was missing) it still counts.
my $equalflightsqt = <<END;
SELECT flight, blessing, started FROM flights
- WHERE branch=? $maxflight_cond
+ WHERE branch=?
+ AND $restrictflight_cond
AND blessing = (
SELECT intended FROM flights WHERE flight = ?
)
@@ -1252,7 +1253,8 @@ END
my ($minflight) = $dbh_tests->selectrow_array(<<END, {}, $branch);
SELECT flight FROM (
SELECT flight FROM flights
- WHERE branch=? AND $blessingscond $maxflight_cond
+ WHERE branch=? AND $blessingscond
+ AND $restrictflight_cond
AND flight >= $repro_firstflight
ORDER BY flight DESC
LIMIT 100
--
1.7.10.4
next prev parent reply other threads:[~2015-07-23 18:20 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 18:19 [OSSTEST PATCH 00/10] Bisection fix and reporting improvements Ian Jackson
2015-07-23 18:19 ` [OSSTEST PATCH 01/10] Flight restriction: Move $maxflight to Osstest::Executive Ian Jackson
2015-07-24 9:20 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 02/10] Flight restriction: Introduce restrictflight_arg and restrictflight_cond Ian Jackson
2015-07-24 9:21 ` Ian Campbell
2015-07-23 18:19 ` Ian Jackson [this message]
2015-07-24 9:21 ` [OSSTEST PATCH 03/10] Flight restriction: Update cs-bisection-step Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 04/10] Flight restriction: Update sg-report-flight and sg-report-job-history Ian Jackson
2015-07-24 9:22 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 05/10] Flight restriction: Make report_blessingscond use implicit $maxflight Ian Jackson
2015-07-24 9:24 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 06/10] Flight restriction: Change implementation of --max-flight Ian Jackson
2015-07-24 9:24 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 07/10] Flight restriction: Honour --exclude-flights=F1, F2, Ian Jackson
2015-07-24 9:25 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 08/10] cs-bisection-step: Fix memoisation of search_compute_length_at Ian Jackson
2015-07-24 9:26 ` Ian Campbell
2015-07-24 10:57 ` Ian Jackson
2015-07-24 11:09 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 09/10] sg-report-job-history: Introduce report_altchangecolour Ian Jackson
2015-07-24 9:27 ` Ian Campbell
2015-07-23 18:19 ` [OSSTEST PATCH 10/10] sg-report-job-history: Colour host column according to whether it changes Ian Jackson
2015-07-24 9:28 ` Ian Campbell
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=1437675564-16602-4-git-send-email-ian.jackson@eu.citrix.com \
--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).