From: Ian Jackson Subject: [OSSTEST PATCH 06/14] Reporting: sg-report-job-history: support --max-flight Date: Tue, 30 Jun 2015 10:57:43 +0100 Message-ID: <1435658271-31823-7-git-send-email-ian.jackson@eu.citrix.com> References: <1435658271-31823-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 1Z9sIm-0007P6-HF for xen-devel@lists.xenproject.org; Tue, 30 Jun 2015 09:58:04 +0000 In-Reply-To: <1435658271-31823-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 Using report_blessingscond instead of the open-coded map. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- sg-report-job-history | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sg-report-job-history b/sg-report-job-history index 51cb5b6..3d02e3f 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -30,6 +30,7 @@ use Osstest::Executive; our (@blessings,@branches); our $limit= 100; our $htmlout; +our $maxflight; open DEBUG, ">/dev/null"; @@ -40,6 +41,8 @@ while (@ARGV && $ARGV[0] =~ m/^-/) { $$1= $2; } elsif (m/^--(limit)\=([1-9]\d*)$/) { $$1= $2; + } elsif (m/^--max-flight\=([1-9]\d*)$/) { + $maxflight= $1; } elsif (m/^--html-dir=(.*)$/) { $htmlout= $1; } elsif (m/^--branches?=(.*)$/) { @@ -116,9 +119,9 @@ sub processjobbranch ($$) { my @rev_grid_cols; my @test_rows; - my $blessingscond= '('.join(' OR ', map { "blessing=?" } @blessings).')'; + my $blessingscond= report_blessingscond(\@blessings, $maxflight); my $cond = "job = ? AND $blessingscond"; - my (@params) = ($j, @blessings); + my (@params) = ($j); if (defined $bra) { $cond .= " AND branch = ?"; push @params, $bra; -- 1.7.10.4