From: Ian Jackson Subject: [OSSTEST PATCH 05/10] Flight restriction: Make report_blessingscond use implicit $maxflight Date: Thu, 23 Jul 2015 19:19:19 +0100 Message-ID: <1437675564-16602-6-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 1ZIL6c-00084K-DL for xen-devel@lists.xenproject.org; Thu, 23 Jul 2015 18:20:30 +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 We have $maxflight in Osstest::Executive now, set appropriately. Use that in report_blessingscond and all its callers including report_find_push_age_info and hence in mg-all-branch-statuses and sg-report-flight and sg-report-job-history. No functional change. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 21 ++++++++++----------- mg-all-branch-statuses | 2 +- sg-report-flight | 4 ++-- sg-report-job-history | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 05a7268..a1bc0ad 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -277,20 +277,19 @@ sub report_altcolour ($) { return "bgcolor=\"#".(qw(d0d0d0 ffffff))[$bool]."\""; } -sub report_blessingscond ($$) { - my ($blessings, $maxflight) = @_; +sub report_blessingscond ($) { + my ($blessings) = @_; + my $flightcond= restrictflight_cond(); my $blessingscond= '('.join(' OR ', map { die if m/[^-_.0-9a-z]/; "blessing='$_'" } @$blessings).')'; - if (defined $maxflight) { - $blessingscond= "( flight <= $maxflight AND $blessingscond )"; - } + return "( $flightcond AND $blessingscond )"; return $blessingscond; } -sub report__find_test ($$$$$$$$) { - my ($blessings, $maxflight, $branches, $tree, +sub report__find_test ($$$$$$$) { + my ($blessings, $branches, $tree, $revision, $selection, $extracond, $sortlimit) = @_; # Reports information about a flight which tried to test $revision # of $tree. ($revision may be undef); @@ -332,7 +331,7 @@ END END } - my $blessingscond = report_blessingscond($blessings,$maxflight); + my $blessingscond = report_blessingscond($blessings); $querytext .= <