Francois Gouget : winetest/gather: Add --update-all to force refresh all builds.
Alexandre Julliard
julliard at winehq.org
Mon Apr 12 16:11:19 CDT 2021
Module: tools
Branch: master
Commit: fce6cff49b2c6c2490f447f495579a858cfa4b89
URL: https://source.winehq.org/git/tools.git/?a=commit;h=fce6cff49b2c6c2490f447f495579a858cfa4b89
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Apr 12 11:16:35 2021 +0200
winetest/gather: Add --update-all to force refresh all builds.
This allows moving the reports to the right index after modifying the
platform groups.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
winetest/gather | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/winetest/gather b/winetest/gather
index 1a61b0c..750f0ee 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -176,7 +176,7 @@ my %idmap = (95 => \%w95, 98 => \%w98, me => \%me,
# Command line processing
#
-my ($opt_workdir, $builddir, $usage);
+my ($opt_workdir, $builddir, $update_all, $usage);
sub check_opt_val($$)
{
@@ -207,6 +207,10 @@ while (@ARGV)
{
$builddir = check_opt_val($arg, $builddir);
}
+ elsif ($arg eq "--update-all")
+ {
+ $update_all = 1;
+ }
elsif ($arg eq "--help")
{
$usage = 0;
@@ -235,10 +239,18 @@ if (!defined $usage)
error("'$workdir' is not a valid work directory\n");
$usage = 2;
}
- if (defined $builddir and !-f "$builddir/summary.txt")
+ if (defined $builddir)
{
- error("the '$builddir' build directory is not valid\n");
- $usage = 1;
+ if (!-f "$builddir/summary.txt")
+ {
+ error("the '$builddir' build directory is not valid\n");
+ $usage = 1;
+ }
+ elsif ($update_all)
+ {
+ error("--update and --update-all are mutually exclusive\n");
+ $usage = 2;
+ }
}
}
if (defined $usage)
@@ -249,7 +261,7 @@ if (defined $usage)
exit $usage;
}
print <<EOF;
-Usage: $name0 [--workdir DIR] [--update BUILD] [--help]
+Usage: $name0 [--workdir DIR] [--update BUILD|--update-all] [--help]
Identifies one build that received new reports and updates its summary and
HTML index files.
@@ -260,6 +272,8 @@ Where:
--update BUILD Forcefully refreshes the specified build directory.
BUILD should be a full path. If an outdated file is
present, it is removed.
+ --update-all Forcefully refreshes every build directory. This can be
+ used when the platform groups have been modified.
--help Shows this usage message.
Actions:
@@ -283,6 +297,19 @@ EOF
exit 0;
}
+if ($update_all)
+{
+ my @cmd = ($0, "--workdir", $workdir, "--update");
+ foreach my $builddir (glob "$workdir/data/*")
+ {
+ next if ($builddir !~ m~/data/[0-9a-f]{40}$~);
+ next if (!-d $builddir);
+ my $rc = system(@cmd, $builddir);
+ exit $rc if ($rc != 0 and $rc != 2);
+ }
+ exit 0;
+}
+
chdir($workdir) or die "could not chdir to the work directory: $!";
if (!defined $builddir)
More information about the wine-cvs
mailing list