[tools] winetest/dissect: Add an optional --max-fails option.
Francois Gouget
fgouget at codeweavers.com
Mon May 3 08:42:18 CDT 2021
This allows not 'rejecting' old reports when reprocessing reports
in-place.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
I recently changed which Windows 10 versions are allowed to have an
'extra 20 failures' on account of being new.
This now excludes Windows 1909 but we still have reports that got
accepted under the old rules. Unfortunately those got 'rejected' when
dissect was rerun to refresh the status values [1]. Except 'rejected' is
not quite true since they did not get moved to ~/queue/errXXX since
doing that is the job of the cron script.
So these reports stayed in place but had no status for the test units
after the 50 failures limit got reached; resulting in a bunch of
patterns with 'n' for 'not run for an unknown reason' in the 'old
failures' list.
To clear that I suggest running dissect one more (last?) time while
using the new --max-fails option to manually raise the failures limit.
Since we know the reports in data/ have already been deemed worthy, any
high value will do. So for instance:
cd winetest/data
find `pwd`/ -name report -print | \
nice xargs -P8 -n 1 dissect --max-fails 90 --update
And it's ok to stop there: the next time a report is added the cron
script will take care of running all the gather and build-* scripts.
(for an update with no delay the instructions in [1] still work)
Note: I called the option --max-fails because --max-failed-tests is just
too much to type on the command line ;-)
[1] https://www.winehq.org/pipermail/wine-devel/2021-April/185729.html
---
winetest/dissect | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect
index ea76cb85e..33cfb0a56 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:
--
2.20.1
More information about the wine-devel
mailing list