- Made runtest "use strict". - Added new option -M to specify which modules should be tested as builtin.
diff --git a/Make.rules.in b/Make.rules.in index 7866e7d..8cfe6d3 100644 --- a/Make.rules.in +++ b/Make.rules.in
@@ -61,7 +61,7 @@ WINAPI_CHECK = $(TOPSRCDIR)/tools/winapi_check/winapi_check WINETEST = $(TOPOBJDIR)/programs/winetest/winetest RUNTEST = $(TOPSRCDIR)/programs/winetest/runtest -RUNTESTFLAGS = -q -P wine -T $(TOPOBJDIR) +RUNTESTFLAGS = -q -P wine -M $(MODULE) -T $(TOPOBJDIR) TESTRESULTS = $(PLTESTS:.pl=.ok) $(CTESTS:.c=.ok) WINEBUILD = $(TOPOBJDIR)/tools/winebuild/winebuild MAKEDEP = $(TOPOBJDIR)/tools/makedep
diff --git a/programs/winetest/runtest b/programs/winetest/runtest index 0032d73..dddcd5d 100755 --- a/programs/winetest/runtest +++ b/programs/winetest/runtest
@@ -5,6 +5,8 @@ # Usage: runtest [options] input_file [perl_args...] # +use strict; + sub usage { print STDERR <<EOF; @@ -12,28 +14,35 @@ Usage: $0 [options] input_file [perl_args...] Options: - -q quiet mode - -v verbose mode (can be specified multiple times) - -I dir prepend dir to Perl include path - -P name set the current platform name - -T dir set Wine tree top directory (autodetected if not specified) + -q quiet mode + -v verbose mode (can be specified multiple times) + -I dir prepend dir to Perl include path + -P name set the current platform name + -M names set the module names to be tested + -T dir set Wine tree top directory (autodetected if not specified) EOF exit 1; } # default values -$platform = $ENV{WINETEST_PLATFORM}; +my $platform = $ENV{WINETEST_PLATFORM}; $ENV{WINETEST_DEBUG} ||= 1; +my $topobjdir; +my $infile; +my @include_dirs; +my @modules; + # parse command-line options while ($#ARGV >= 0) { - $arg = shift @ARGV; + my $arg = shift @ARGV; if ($arg eq "-h") { usage; } if ($arg eq "-q") { $ENV{WINETEST_DEBUG} = 0; next; } if ($arg eq "-v") { $ENV{WINETEST_DEBUG}++; next; } if ($arg eq "-P") { $platform = shift @ARGV; next; } + if ($arg eq "-M") { push @modules, split /,/, shift @ARGV; next; } if ($arg eq "-I") { push @include_dirs, shift @ARGV; next; } if ($arg eq "-T") { @@ -86,11 +95,16 @@ if (-d $basedir . "/include") { push @include_dirs, $basedir . "/include"; } $ENV{PERL5LIB} = join( ":", @include_dirs, split( ":", $ENV{PERL5LIB} ) ); +if (@modules) +{ + if (defined($ENV{WINEOPTIONS})) { $ENV{WINEOPTIONS} .= " "; } + $ENV{WINEOPTIONS} .= "--dll " . join(',',@modules) . "=b"; +} # and now exec winetest if (defined($topobjdir)) { - exec $topobjdir . "/programs/winetest/winetest", "--", $infile, @ARGV; + exec $topobjdir . "/programs/winetest/winetest", $infile, @ARGV; } exec "winetest", $infile, @ARGV; print STDERR "Could not exec winetest\n";