Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7FDFC433E1 for ; Fri, 14 Aug 2020 17:26:49 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 876BA20708 for ; Fri, 14 Aug 2020 17:26:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="JxVGtU5S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 876BA20708 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=eu.citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k6dTN-0003zu-0T; Fri, 14 Aug 2020 17:26:33 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k6dQs-00024H-1V for xen-devel@lists.xenproject.org; Fri, 14 Aug 2020 17:23:58 +0000 X-Inumbo-ID: 749a8c06-0975-4c08-af34-0971eb50803e Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 749a8c06-0975-4c08-af34-0971eb50803e; Fri, 14 Aug 2020 17:22:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1597425740; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=w0mAgyyUXpLt7oHYlPS5haLuq7oCjn7NqYL9AvRgxDs=; b=JxVGtU5SsWrrnnU7DeKQC9fuW8HP7hUp3EhNFZNnFE45muHoQhcdmRcw ABk47UMNWv2DU3RV/9zCOYaplzHrXrzt0KQmP9PNfFfbpLpoH4onxSfAh mS2k8TaVQDJNU1U7rqtejokgF9HgKupeKE3B7vTxM434kGSLQkr9NW92P k=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: GQnkPuEvFvPygCaE7B/72A7gl2K5hfP+jxP3OspD//H00LURecshAlXMAOe9QCuqTw9cGMJ2G0 c8e0ACC/5PN2gYge1t3cWzVRQsgTiDkpsbHt5T0Tk4005tmRagTExLVazGd9DpAf1MMDmqHkMN Hp0fMMMb4/MfZzdWvTd92KxeCzh57SP/T9r7fVbQ7CxRw6n04YEuZ66lZzk5NsMqVT44iSr0jx SPKZJdsqwXn8VD4qkMq7tvyzAfhb3ynbLeZUOUBeS9fsX4j3oSaMfzxonz5E4FR48aCEmESv/l nJw= X-SBRS: 2.7 X-MesageID: 24725189 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.76,313,1592884800"; d="scan'208,217";a="24725189" From: Ian Jackson To: CC: Ian Jackson Subject: [OSSTEST PATCH 37/60] sg-report-job-history (nfc): Remove needless conditional Date: Fri, 14 Aug 2020 18:21:42 +0100 Message-ID: <20200814172205.9624-38-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200814172205.9624-1-ian.jackson@eu.citrix.com> References: <20200814172205.9624-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" $htmlout is now always defined. Nothing other than indentation change, and removal of the surrounding if block. Signed-off-by: Ian Jackson --- sg-report-job-history | 162 +++++++++++++++++++++++++------------------------- 1 file changed, 80 insertions(+), 82 deletions(-) diff --git a/sg-report-job-history b/sg-report-job-history index 7197a5f6..3b45992f 100755 --- a/sg-report-job-history +++ b/sg-report-job-history @@ -209,89 +209,87 @@ END WHERE flight=? END - if (defined $htmlout) { - my ($title,$url); - ensuredir "$htmlout/history"; - ensuredir "$htmlout/history/$j"; - if (defined $bra) { - $title= "$j (branch $bra)"; - } else { - $title= "$j (all branches)"; - } - $html_file= "$htmlout/$html_file"; - open H, "> $html_file.new" or die "$html_file $!"; - $title= encode_entities($title); - print H "$title\n"; - print H "

$title

\n"; - print H ""; - print H "", - "\n"; - print H "\n"; - print H ""; - foreach my $c (@rev_grid_cols) { - print H "\n"; - } - print H "\n"; - my $alternate= 0; - my @last_revs; - my @alt_revs; - my $alt_hosts; - my $alt_osstest; - foreach my $r (@test_rows) { - my $altcolour= report_altcolour($alternate); - print H ""; - my $started = $r->{Flight}{started}; - print H "\n"; - my $flt= $r->{Flight}{flight}; - $url= "$c{ReportHtmlPubBaseUrl}/$flt"; - print H "\n"; - print H "\n"; - $url= "$c{ReportHtmlPubBaseUrl}/$flt/".encode_entities($j). - "/info.html"; - print H "\n"; - my $lastrev; - my $hosts = join ", ", map { $_ // "-" } @{ $r->{Hosts} }; - my $hosts_colour = report_altchangecolour(\$alt_hosts, $hosts); - print H "\n"; - $osstestverq->execute($r->{Flight}{flight}); - my $osstestrevs = join ' ', - map { - $_ = $_->{harness}; - s/^([0-9a-f]{12})[0-9a-f]+\b/$1/; - "".encode_entities($_).""; - } - @{ $osstestverq->fetchall_arrayref({}) }; - my $osstest_colour = report_altchangecolour(\$alt_osstest, $osstestrevs); - print H "\n"; - foreach my $i (0..$#rev_grid_cols) { - my $v= $r->{Revisions}[$i]; - my $rev_colour = report_altchangecolour(\$alt_revs[$i], $v); - print H ""; - } - print H "\n"; - $alternate ^= 1; - } - print H "
startedflightbranchfailure", (join ", ", @hostvarcols), "osstest".encode_entities($c)."
"; - print H show_abs_time $started if $started; - print H "$flt".encode_entities($r->{Flight}{branch})."{ColourAttr}>". - $r->{Content}."".encode_entities($hosts)."$osstestrevs"; - if (defined $v) { - my $vp= $v; - if (defined $lastrev && $v eq $lastrev) { - $vp= '<-'; - } else { - $vp =~ s/^((?:\d+\:)?[0-9a-f]{12})([0-9a-f].*)$/$1/; - } - print H "".encode_entities($vp).""; - } - $lastrev= $v; - $last_revs[$i]= $v; - print H "
\n"; - H->error and die $!; - close H or die $!; - rename "$html_file.new", $html_file or die "$html_file $!"; - #print "wrote $html_file\n"; + my ($title,$url); + ensuredir "$htmlout/history"; + ensuredir "$htmlout/history/$j"; + if (defined $bra) { + $title= "$j (branch $bra)"; + } else { + $title= "$j (all branches)"; + } + $html_file= "$htmlout/$html_file"; + open H, "> $html_file.new" or die "$html_file $!"; + $title= encode_entities($title); + print H "$title\n"; + print H "

$title

\n"; + print H ""; + print H "", + "\n"; + print H "\n"; + print H ""; + foreach my $c (@rev_grid_cols) { + print H "\n"; + } + print H "\n"; + my $alternate= 0; + my @last_revs; + my @alt_revs; + my $alt_hosts; + my $alt_osstest; + foreach my $r (@test_rows) { + my $altcolour= report_altcolour($alternate); + print H ""; + my $started = $r->{Flight}{started}; + print H "\n"; + my $flt= $r->{Flight}{flight}; + $url= "$c{ReportHtmlPubBaseUrl}/$flt"; + print H "\n"; + print H "\n"; + $url= "$c{ReportHtmlPubBaseUrl}/$flt/".encode_entities($j). + "/info.html"; + print H "\n"; + my $lastrev; + my $hosts = join ", ", map { $_ // "-" } @{ $r->{Hosts} }; + my $hosts_colour = report_altchangecolour(\$alt_hosts, $hosts); + print H "\n"; + $osstestverq->execute($r->{Flight}{flight}); + my $osstestrevs = join ' ', + map { + $_ = $_->{harness}; + s/^([0-9a-f]{12})[0-9a-f]+\b/$1/; + "".encode_entities($_).""; + } + @{ $osstestverq->fetchall_arrayref({}) }; + my $osstest_colour = report_altchangecolour(\$alt_osstest, $osstestrevs); + print H "\n"; + foreach my $i (0..$#rev_grid_cols) { + my $v= $r->{Revisions}[$i]; + my $rev_colour = report_altchangecolour(\$alt_revs[$i], $v); + print H ""; + } + print H "\n"; + $alternate ^= 1; } + print H "
startedflightbranchfailure", (join ", ", @hostvarcols), "osstest".encode_entities($c)."
"; + print H show_abs_time $started if $started; + print H "$flt".encode_entities($r->{Flight}{branch})."{ColourAttr}>". + $r->{Content}."".encode_entities($hosts)."$osstestrevs"; + if (defined $v) { + my $vp= $v; + if (defined $lastrev && $v eq $lastrev) { + $vp= '<-'; + } else { + $vp =~ s/^((?:\d+\:)?[0-9a-f]{12})([0-9a-f].*)$/$1/; + } + print H "".encode_entities($vp).""; + } + $lastrev= $v; + $last_revs[$i]= $v; + print H "
\n"; + H->error and die $!; + close H or die $!; + rename "$html_file.new", $html_file or die "$html_file $!"; + #print "wrote $html_file\n"; } my @tasks; -- 2.11.0