From e2e70236a15e37741d9ff0a31cbf9371c27ee745 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Sat, 2 Feb 2002 18:22:08 +0000 Subject: [PATCH] - Made runtest "use strict". - Added new option -M to specify which modules should be tested as builtin. --- Make.rules.in | 2 +- programs/winetest/runtest | 30 ++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index 7866e7d1e3e..8cfe6d3788b 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -61,7 +61,7 @@ ALLLINTFLAGS = $(LINTFLAGS) $(DEFS) $(OPTIONS) $(DIVINCL) 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 0032d736903..dddcd5dd49e 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 <= 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 @@ else { $basedir = "."; } 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";