[tools] winetest: Allow overriding $workdir from the command line.

Francois Gouget fgouget at codeweavers.com
Fri Apr 9 04:42:44 CDT 2021


$workdir is typically already set in winetest.conf and modifying that 
file should not be necessary to use the --workdir option.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 winetest/build-index | 4 ++--
 winetest/dissect     | 5 ++---
 winetest/gather      | 5 ++---
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/winetest/build-index b/winetest/build-index
index f2e3dcf6d..5903f80ab 100755
--- a/winetest/build-index
+++ b/winetest/build-index
@@ -113,7 +113,7 @@ my @groups = (\%w95, \%w98, \%me, \%nt3, \%nt4, \%w2k, \%xp, \%w2k3, \%vista, \%
 # Command line processing
 #
 
-my $usage;
+my ($opt_workdir, $usage);
 
 sub check_opt_val($$)
 {
@@ -138,7 +138,7 @@ while (@ARGV)
     my $arg = shift @ARGV;
     if ($arg eq "--workdir")
     {
-        $workdir = check_opt_val($arg, $workdir);
+        $workdir = $opt_workdir = check_opt_val($arg, $opt_workdir);
     }
     elsif ($arg eq "--help")
     {
diff --git a/winetest/dissect b/winetest/dissect
index c681c7d11..12df56ae9 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -28,7 +28,6 @@
 # created to signal the change in the given build.
 #
 # To test this script:
-# - Make sure $workdir is not set in winetest.conf
 # - Put a test report in queue/rep1/report
 # - Run ./dissect
 # - Examine the result in data/
@@ -112,7 +111,7 @@ sub short_date($)
 # Command line processing
 #
 
-my ($update, $report, $usage);
+my ($opt_workdir, $update, $report, $usage);
 
 sub check_opt_val($$)
 {
@@ -137,7 +136,7 @@ while (@ARGV)
     my $arg = shift @ARGV;
     if ($arg eq "--workdir")
     {
-        $workdir = check_opt_val($arg, $workdir);
+        $workdir = $opt_workdir = check_opt_val($arg, $opt_workdir);
     }
     elsif ($arg eq "--update")
     {
diff --git a/winetest/gather b/winetest/gather
index 302def437..09e4dfff1 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -26,7 +26,6 @@
 # level.
 #
 # To test this script:
-# - Make sure $workdir is not set in winetest.conf
 # - After running dissect, run ./gather
 # - Examine the result in data/
 #
@@ -180,7 +179,7 @@ my %idmap = (95=>\%w95, 98=>\%w98, me=>\%me, nt3=>\%nt3, nt4=>\%nt4, 2000=>\%w2k
 # Command line processing
 #
 
-my ($builddir, $usage);
+my ($opt_workdir, $builddir, $usage);
 
 sub check_opt_val($$)
 {
@@ -205,7 +204,7 @@ while (@ARGV)
     my $arg = shift @ARGV;
     if ($arg eq "--workdir")
     {
-        $workdir = check_opt_val($arg, $workdir);
+        $workdir = $opt_workdir = check_opt_val($arg, $opt_workdir);
     }
     elsif ($arg eq "--update")
     {
-- 
2.20.1




More information about the wine-devel mailing list