From patchwork Thu Oct 2 17:06:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 38301 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5C375201F1 for ; Thu, 2 Oct 2014 17:08:52 +0000 (UTC) Received: by mail-wg0-f69.google.com with SMTP id b13sf1472325wgh.0 for ; Thu, 02 Oct 2014 10:08:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=74f/Izb+0/rX91ncZZufS9KvWRCpwL5bHm0yIzOEWW4=; b=CRATUXn7rbncvJsF+LqUrSDxE0j+F8V6oBbdlW5lthk0E/yGEbGwc0Fu1Em8eO+2qW xxiPxB9FjnAQowqUNfdk1UMcJniWKJqg0JLGwjpt3OHmxHRWtbMFJsJODE3HPMHe/r5Z FJ7iHATnmnFBNC869PH+e7w+9HHEFaDhGom70P0rDHAEFWdB+pGzsddgS0nzsppalxkj IGFD12zzpxlClfiJYC7kRTWikz5bfbpHtL8gO3/smZzpYV+0ifErAazsOGQNAZWkyu7n De6oEkMSJVhbPEfY4PrFc9J9ltOeFBI2jBHi5EDwIRw7DQIM3/VYoMfb/OzIgk7+CJE/ atog== X-Gm-Message-State: ALoCoQlqmpR/n34IirdfX7gEP7Xd6VEkx6SQFUHC1cA+botD78YZftrR7/v70DVx4R75CLJ5KNhc X-Received: by 10.180.109.194 with SMTP id hu2mr891784wib.1.1412269731599; Thu, 02 Oct 2014 10:08:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.43 with SMTP id cb11ls310024lad.23.gmail; Thu, 02 Oct 2014 10:08:51 -0700 (PDT) X-Received: by 10.112.126.194 with SMTP id na2mr174589lbb.70.1412269731430; Thu, 02 Oct 2014 10:08:51 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by mx.google.com with ESMTPS id xu5si4021450lab.64.2014.10.02.10.08.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 Oct 2014 10:08:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id pv20so2787914lab.6 for ; Thu, 02 Oct 2014 10:08:51 -0700 (PDT) X-Received: by 10.152.45.1 with SMTP id i1mr199799lam.56.1412269731309; Thu, 02 Oct 2014 10:08:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp93385lbb; Thu, 2 Oct 2014 10:08:50 -0700 (PDT) X-Received: by 10.229.212.66 with SMTP id gr2mr187748qcb.27.1412269730121; Thu, 02 Oct 2014 10:08:50 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id gz4si7296923qcb.32.2014.10.02.10.08.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 02 Oct 2014 10:08:50 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XZjq1-0008Ti-KS; Thu, 02 Oct 2014 17:06:45 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XZjq0-0008Tc-0Z for xen-devel@lists.xenproject.org; Thu, 02 Oct 2014 17:06:44 +0000 Received: from [85.158.137.68:5720] by server-1.bemta-3.messagelabs.com id 88/27-30185-3268D245; Thu, 02 Oct 2014 17:06:43 +0000 X-Env-Sender: Ian.Jackson@citrix.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1412269601!11108698!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.12.2; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30592 invoked from network); 2 Oct 2014 17:06:42 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 2 Oct 2014 17:06:42 -0000 X-IronPort-AV: E=Sophos;i="5.04,639,1406592000"; d="scan'208";a="178634003" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.3.181.6; Thu, 2 Oct 2014 13:06:40 -0400 Received: from mariner.uk.xensource.com ([10.80.2.22]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XZjpv-0007lh-LC; Thu, 02 Oct 2014 18:06:39 +0100 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.80) (envelope-from ) id 1XZjpv-0007Du-Cv; Thu, 02 Oct 2014 18:06:39 +0100 From: Ian Jackson To: Date: Thu, 2 Oct 2014 18:06:36 +0100 Message-ID: <1412269596-27733-1-git-send-email-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1412250966-14374-1-git-send-email-ian.campbell@citrix.com> References: <1412250966-14374-1-git-send-email-ian.campbell@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Jackson , Ian Campbell Subject: [Xen-devel] [OSSTEST PATCH v2] sg-report-flight: Add a succcess/failure column header. X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.jackson@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: From: Ian Campbell There are so many rows and columns that scrolling around trying to find the column associated with a failure is getting pretty tricky. Finding all failing columns is even harder. Add a clue near the top: replicate the worst or most interesting step result box contents and colour. Signed-off-by: Ian Campbell Signed-off-by: Ian Jackson --- v2: Do it entirely differently. --- sg-report-flight | 85 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 28 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index 4760656..c8d88e8 100755 --- a/sg-report-flight +++ b/sg-report-flight @@ -822,7 +822,7 @@ END my $st= $step->{status}; my $logfilename= "$step->{stepno}.$step->{step}.log"; printf H "%s", - html_status2colour($st), + (html_status2_colour_priority($st))[0], encode_entities(uri_escape($logfilename)), encode_entities($st); $issteplog{$logfilename}= 1; @@ -886,11 +886,11 @@ END rename "$htmlfile.new", $htmlfile or die $!; } -sub html_status2colour ($) { +sub html_status2_colour_priority ($) { my ($st) = @_; - return ($st eq 'pass' ? '#008800' : - $st eq 'fail' ? '#ff8888' : - '#ffff00'); + return ($st eq 'pass' ? ('#008800',100) : + $st eq 'fail' ? ('#ff8888',200) : + ('#ffff00',300)); } sub htmlout ($) { @@ -923,6 +923,56 @@ END print H ""; } print H "\n"; + print H ""; + print H "Worst/last"; + print H ""; + + my $cell_html = sub { + my ($ei) = @_; + # => ($h, $priority); + my $s= $ei->{Step}; + my $sum_core= $ei->{SummaryCore}; + $sum_core= $ei->{Summary} if !defined $sum_core; + my $sum_flight= $ei->{SummaryRefFlight}; + my $bgc; + my $priority; + if (!defined $sum_core || !length $sum_core) { + $sum_core= $s->{status}; + ($bgc,$priority)= html_status2_colour_priority($s->{status}); + } else { + ($bgc,$priority) = + $ei->{Blocker} eq 'regression' + ? ('#ff8888',400) + : ('#ffff00',250); + } + my $h = " bgcolor=\"$bgc\">"; + $h .= "{job}). + "/$s->{stepno}.".encode_entities($s->{step}).".log\">"; + #print H "[$s->{stepno}] "; + $h .= encode_entities($sum_core); + $h .= ""; + if (defined $sum_flight) { + $h .= " ". + displayflightnum($sum_flight).""; + } + return ($h,$priority); + }; + + foreach my $col (@cols) { + my @worst=(' bgcolor="#444444">',0); + foreach my $rowix (0..$#{ $fi->{GridRows} }) { + my $ei= $fi->{GridGrid}{$col}[$rowix]; + next unless $ei; + my @this = $cell_html->($ei); + next if $this[1] < $worst[1]; + @worst=@this; + } + print H ""; + } + print H "\n"; + # Create a gutter row after the headers. + print H " \n"; + foreach my $rowix (0..$#{ $fi->{GridRows} }) { next unless $fi->{GridRows}[$rowix]; my $rowdesc= encode_entities($fi->{GridRows}[$rowix]); @@ -962,30 +1012,9 @@ END my $ei= $fi->{GridGrid}{$col}[$rowix]; if ($ei) { $deferred_cells->(1); - print H "{Step}; - my $sum_core= $ei->{SummaryCore}; - my $sum_flight= $ei->{SummaryRefFlight}; - $sum_core= $ei->{Summary} if !defined $sum_core; - my $bgc; - if (!defined $sum_core || !length $sum_core) { - $sum_core= $s->{status}; - $bgc= html_status2colour($s->{status}); - } else { - $bgc= $ei->{Blocker} eq 'regression' - ? '#ff8888' : '#ffff00'; - } - print H " bgcolor=\"$bgc\">"; - print H "{stepno}.".encode_entities($s->{step}).".log\">"; - #print H "[$s->{stepno}] "; - print H encode_entities($sum_core); - print H ""; - if (defined $sum_flight) { - print H " ". - displayflightnum($sum_flight).""; - } - print H ""; + my ($h,$priority) = $cell_html->($ei); + print H ""; } else { $ndeferred++; }