From patchwork Wed Aug 28 06:45:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Remi Peuvergne X-Patchwork-Id: 1977623 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=free.fr header.i=@free.fr header.a=rsa-sha256 header.s=smtp-20201208 header.b=oBEy1CRY; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=patchwork.ozlabs.org) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Wtw0R3P8Kz1yfn for ; Wed, 28 Aug 2024 16:45:43 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id DD5663D2788 for ; Wed, 28 Aug 2024 08:45:38 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 3FA3C3D273C for ; Wed, 28 Aug 2024 08:45:35 +0200 (CEST) Authentication-Results: in-7.smtp.seeweb.it; spf=pass (sender SPF authorized) smtp.mailfrom=free.fr (client-ip=2a01:e0c:1:1599::10; helo=smtp1-g21.free.fr; envelope-from=rpeuvergne@free.fr; receiver=lists.linux.it) Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [IPv6:2a01:e0c:1:1599::10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id 471EB208FA4 for ; Wed, 28 Aug 2024 08:45:34 +0200 (CEST) Received: from pof-builder.fr (unknown [31.32.198.145]) (Authenticated sender: rpeuvergne@free.fr) by smtp1-g21.free.fr (Postfix) with ESMTPSA id A4DE0B0037C; Wed, 28 Aug 2024 08:45:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1724827532; bh=0UV4b6ovxdqGUFhLV6Leq+2l5UcApxXTWkrTiKhOwt8=; h=From:To:Cc:Subject:Date:From; b=oBEy1CRY0xLjcs3KP13kdIs9aH8VHnzCfjrPehnmXEimusftzSaekRvtYKMeeSO84 UI4AQDKdJcBCt1LklEqtGh2rdLwhaiKkE0Xy6eA1+vD9o5VK3VQdr3IFU+lX0/Em7c 9aWRIZa+T7NTJYRR5zUeBwEFTZuoIcqAReQKOTvpiSKfe05GoCAXOIeFJ4t3CU1qie q8rjt92rJCm4rcordb4p8eLNwClr5D2UL1LOBvnbXtphoY+1TUFBCuRn6pthdITxzC x7zGid40wQaALj6Jw62Es81J3jA6tTq6FuQasBWa610H0jMB164qylhQIsDPxAc40T B8Fk4ndp4fYfg== From: Remi Peuvergne To: ltp@lists.linux.it Date: Wed, 28 Aug 2024 08:45:26 +0200 Message-Id: <20240828064526.235050-1-rpeuvergne@free.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=disabled version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on in-7.smtp.seeweb.it X-Virus-Scanned: clamav-milter 1.0.3 at in-7.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [PATCH] HTML report: Fix row coloring depending on test status X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Remi Peuvergne Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" From: Remi Peuvergne The "state machine" was broken and the overall test status was obtained *after* if was used (in the get_background_colour_column function). Fix this with a change for flag4, which now increases only when we know test status. Signed-off-by: Remi Peuvergne --- tools/genhtml.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/genhtml.pl b/tools/genhtml.pl index d8f52663b..5a9256500 100644 --- a/tools/genhtml.pl +++ b/tools/genhtml.pl @@ -162,6 +162,7 @@ foreach my $file (@ARGV) { "

$termination_id_value[1]

\n" . "

$corefile_value[1]

\n"; $row_line =~ s///; + $flag4++; } if ( $flag4 == 3 ) { @variable_value_pair = split(/\ /, $line); @@ -170,7 +171,6 @@ foreach my $file (@ARGV) { $row_line = $row_line . "

$cutime_value[1]

\n" . "

$cstime_value[1]

\n"; } - $flag4++; } if ( $line =~ /$execution_tag/ ) { $flag2 = 0; @@ -186,18 +186,23 @@ foreach my $file (@ARGV) { if ($line =~ "termination_id=1" ) { $detected_fail = 1; $failed_test_counter++; + $flag4 = 2; } elsif ($line =~ "termination_id=2" ) { $detected_brok = 1; $brok_test_counter++; + $flag4 = 2; } elsif ($line =~ "termination_id=4" ) { $detected_warn = 1; $warn_test_counter++; + $flag4 = 2; } elsif ($line =~ "termination_id=32" ) { $detected_conf = 1; $conf_test_counter++; + $flag4 = 2; } elsif ($line =~ "termination_id=0" ) { $detected_pass = 1; $test_passed++; + $flag4 = 2; } } if ( $line =~ /$output_tag/ ) {