From: Ian Jackson Subject: [OSSTEST PATCH 03/10] Flight restriction: Update cs-bisection-step Date: Thu, 23 Jul 2015 19:19:17 +0100 Message-ID: <1437675564-16602-4-git-send-email-ian.jackson@eu.citrix.com> References: <1437675564-16602-1-git-send-email-ian.jackson@eu.citrix.com> 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 1ZIL6G-0007sd-N5 for xen-devel@lists.xenproject.org; Thu, 23 Jul 2015 18:20:08 +0000 In-Reply-To: <1437675564-16602-1-git-send-email-ian.jackson@eu.citrix.com> 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 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 --- 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(<= $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 = <selectrow_array(<= $repro_firstflight ORDER BY flight DESC LIMIT 100 -- 1.7.10.4