Francois Gouget : winetest: Share the group definitions.

Alexandre Julliard julliard at winehq.org
Tue May 11 16:32:48 CDT 2021


Module: tools
Branch: master
Commit: 5c545047030fb1603a6102fdf096cae4ff2084ce
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=5c545047030fb1603a6102fdf096cae4ff2084ce

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue May 11 18:24:46 2021 +0200

winetest: Share the group definitions.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/build-index   | 36 +-----------------------------
 winetest/gather        | 59 ++++++--------------------------------------------
 winetest/winetest.conf | 27 +++++++++++++++++++++++
 3 files changed, 35 insertions(+), 87 deletions(-)

diff --git a/winetest/build-index b/winetest/build-index
index e69ea1f..d6f04a0 100755
--- a/winetest/build-index
+++ b/winetest/build-index
@@ -32,7 +32,7 @@ sub BEGIN
     }
     unshift @INC, $1 if ($0 =~ m=^(/.*)/[^/]+$=);
 }
-use vars qw/$workdir $gitdir $gitweb/;
+use vars qw/$workdir $gitdir $gitweb @groups/;
 require "winetest.conf";
 
 my $name0=$0;
@@ -80,40 +80,6 @@ sub short_date($)
 }
 
 
-# This should match the definitions in gather
-
-my %w95     = (name => "Win95");
-my %w98     = (name => "Win98");
-my %me      = (name => "Me");
-my %nt3     = (name => "NT3");
-my %nt4     = (name => "NT4");
-my %w2k     = (name => "2000");
-my %xp      = (name => "XP");
-my %w2k3    = (name => "2003");
-my %vista   = (name => "Vista");
-my %w2k8    = (name => "2008");
-my %win7    = (name => "Win7");
-my %win8    = (name => "Win8");
-my %win1507 = (name => "Win1507+");
-my %win1709 = (name => "Win1709+");
-my %win1909 = (name => "Win1909+");
-my %win10   = (name => "Win10");
-my %win10l  = (name => "Win10L");
-my %unknown = (name => "Other");
-my %linux   = (name => "Linux");
-my %mac     = (name => "Mac");
-my %bsd     = (name => "BSD");
-my %solaris = (name => "Solaris");
-my %wine    = (name => "Wine");
-
-# Define the order of version groups in the summary
-my @groups = (\%w95, \%w98, \%me,
-              \%nt3, \%nt4, \%w2k, \%xp, \%w2k3,
-              \%vista, \%w2k8, \%win7, \%win8,
-              \%win1507, \%win1709, \%win1909, \%win10, \%win10l,
-              \%unknown, \%linux, \%mac, \%bsd, \%solaris, \%wine);
-
-
 #
 # Command line processing
 #
diff --git a/winetest/gather b/winetest/gather
index b4b9464..e000777 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -32,7 +32,7 @@ sub BEGIN
     }
     unshift @INC, $1 if ($0 =~ m=^(/.*)/[^/]+$=);
 }
-use vars qw/$workdir $gitdir $gitweb/;
+use vars qw/$workdir $gitdir $gitweb @groups/;
 require "winetest.conf";
 
 my $name0=$0;
@@ -126,57 +126,12 @@ sub short_date($)
 #  errors        The number of unit tests with errors.
 #  todos         The number of unit tests with no error but todos.
 
-# This should match the definitions in build-index
-
-my %w95     = (name => "Win95");
-my %w98     = (name => "Win98");
-my %me      = (name => "Me");
-my %nt3     = (name => "NT3");
-my %nt4     = (name => "NT4");
-my %w2k     = (name => "2000");
-my %xp      = (name => "XP");
-my %w2k3    = (name => "2003");
-my %vista   = (name => "Vista");
-my %w2k8    = (name => "2008");
-my %win7    = (name => "Win7");
-my %win8    = (name => "Win8");
-my %win1507 = (name => "Win1507+");
-my %win1709 = (name => "Win1709+");
-my %win1909 = (name => "Win1909+");
-my %win10   = (name => "Win10");
-my %win10l  = (name => "Win10L");
-my %unknown = (name => "Other");
-my %linux   = (name => "Linux");
-my %mac     = (name => "Mac");
-my %bsd     = (name => "BSD");
-my %solaris = (name => "Solaris");
-my %wine    = (name => "Wine");
-
-# Define the order of version groups in the summary
-my @groups = (\%w95, \%w98, \%me,
-              \%nt3, \%nt4, \%w2k, \%xp, \%w2k3,
-              \%vista, \%w2k8, \%win7, \%win8,
-              \%win1507, \%win1709, \%win1909, \%win10, \%win10l,
-              \%unknown, \%linux, \%mac, \%bsd, \%solaris, \%wine);
-
-# Map dissect's IDs to the above hashes
-my %idmap = (95 => \%w95, 98 => \%w98, me => \%me,
-             nt3 => \%nt3, nt4 => \%nt4, 2000 => \%w2k,
-             xp => \%xp, 2003 => \%w2k3,
-             vista => \%vista, 2008 => \%w2k8,
-             win7 => \%win7,
-             win8 => \%win8, win81 => \%win8,
-             win1507 => \%win1507, win1511 => \%win1507,
-             win1607 => \%win1507, win1703 => \%win1507,
-             win1709 => \%win1709, win1803 => \%win1709,
-             win1809 => \%win1709, win1903 => \%win1709,
-             win1909 => \%win1909,
-             win2004 => \%win10l,
-             win2009 => \%win10,
-             win10 => \%win10, # for backward compatibility
-             unknown => \%unknown,
-             wine => \%wine, linux => \%linux, mac => \%mac,
-             bsd => \%bsd, solaris => \%solaris);
+# Map dissect's IDs to the platform groups
+my %idmap;
+foreach my $group (@groups)
+{
+    map { $idmap{$_} = $group } @{$group->{ids}};
+}
 
 
 #
diff --git a/winetest/winetest.conf b/winetest/winetest.conf
index 1f587b3..3041cf7 100644
--- a/winetest/winetest.conf
+++ b/winetest/winetest.conf
@@ -30,4 +30,31 @@ $patternbuilds = 10;
 # Probability above which a failure is considered to be fixed (0..1)
 $fixed_threshold = 0.99;
 
+# Define how and in which order to group the platform results
+ at groups = (
+    { name => "Win95",    ids => [ "95" ] },
+    { name => "Win98",    ids => [ "98" ] },
+    { name => "Me",       ids => [ "me" ] },
+    { name => "NT3",      ids => [ "nt3" ] },
+    { name => "NT4",      ids => [ "nt4" ] },
+    { name => "2000",     ids => [ "2000" ] },
+    { name => "XP",       ids => [ "xp" ] },
+    { name => "2003",     ids => [ "2003" ] },
+    { name => "Vista",    ids => [ "vista" ] },
+    { name => "2008",     ids => [ "2008" ] },
+    { name => "Win7",     ids => [ "win7" ] },
+    { name => "Win8",     ids => [ "win8", "win81" ] },
+    { name => "Win1507+", ids => [ "win1507", "win1511", "win1607", "win1703" ] },
+    { name => "Win1709+", ids => [ "win1709", "win1803", "win1809", "win1903" ] },
+    { name => "Win1909+", ids => [ "win1909" ] },
+    { name => "Win10",    ids => [ "win2009", "win10" ] }, # win10 for backward compatibility
+    { name => "Win10L",   ids => [ "win2004" ] },
+    { name => "Other",    ids => [ "unknown" ] },
+    { name => "Linux",    ids => [ "linux" ] },
+    { name => "Mac",      ids => [ "mac" ] },
+    { name => "BSD",      ids => [ "bsd" ] },
+    { name => "Solaris",  ids => [ "solaris" ] },
+    { name => "Wine",     ids => [ "wine" ] },
+);
+
 1;                              # keep require happy




More information about the wine-cvs mailing list