Francois Gouget : winetest: Allow overriding $workdir from the command line.

Alexandre Julliard julliard at winehq.org
Fri Apr 9 14:48:31 CDT 2021


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Fri Apr  9 11:42:44 2021 +0200

winetest: Allow overriding $workdir from the command line.

$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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 91c7c92..94453f4 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 c681c7d..12df56a 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 51d4838..ae754d9 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")
     {




More information about the wine-cvs mailing list