Module: tools Branch: master Commit: 9fa45eed7f60ee2850a8bc396ed28b74d76d32aa URL: https://source.winehq.org/git/tools.git/?a=commit;h=9fa45eed7f60ee2850a8bc39...
Author: Francois Gouget fgouget@codeweavers.com Date: Mon May 3 15:42:18 2021 +0200
winetest/dissect: Add an optional --max-fails option.
This allows not 'rejecting' old reports when reprocessing reports in-place.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
winetest/dissect | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index ea76cb8..33cfb0a 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -92,7 +92,7 @@ sub short_date($) # Command line processing #
-my ($opt_workdir, $update, $report, $usage); +my ($opt_workdir, $opt_maxfails, $update, $report, $usage);
sub check_opt_val($$) { @@ -124,6 +124,10 @@ while (@ARGV) $report = check_opt_val($arg, $report); $update = 1; } + elsif ($arg eq "--max-fails") + { + $opt_maxfails = check_opt_val($arg, $opt_maxfails); + } elsif ($arg eq "--help") { $usage = 0; @@ -146,6 +150,15 @@ if (!defined $usage) require Cwd; $workdir = Cwd::cwd() . "/$workdir"; } + if (defined $opt_maxfails) + { + $maxfailedtests = $opt_maxfails; + if ($opt_maxfails !~ /^\d+$/) + { + error("'$opt_maxfails' must be a positive integer\n"); + $usage = 2; + } + } if (!-f "$workdir/report.css") { error("'$workdir' is not a valid work directory\n"); @@ -165,7 +178,7 @@ if (defined $usage) exit $usage; } print <<EOF; -Usage: $name0 [--workdir DIR] [--update REPORT] [--help] +Usage: $name0 [--workdir DIR] [--update REPORT] [--max-fails MAX] [--help]
Processes a test report to generate the corresponding HTML files.
@@ -174,6 +187,7 @@ Where: files. Can be omitted if set in winetest.conf. --update REPORT Updates the HTML files of the specified test report. Note that it must have already been moved into place. + --max-fails MAX Reject reports with more than MAX failed test units. --help Shows this usage message.
Actions: