From: Ian Jackson Subject: [OSSTEST PATCH 09/13] Reporting sg-report-job-history: support --max-flight Date: Mon, 29 Jun 2015 18:14:45 +0100 Message-ID: <1435598089-21647-10-git-send-email-ian.jackson@eu.citrix.com> References: <1435598089-21647-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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z9ctu-0008QK-U4 for xen-devel@lists.xenproject.org; Mon, 29 Jun 2015 17:31:23 +0000 In-Reply-To: <1435598089-21647-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 --- 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 a932c78..31b8d37 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