1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

- Made runtest "use strict".

- Added new option -M to specify which modules should be tested as
  builtin.
This commit is contained in:
Patrik Stridvall 2002-02-02 18:22:08 +00:00 committed by Alexandre Julliard
parent 62f083ce48
commit e2e70236a1
2 changed files with 23 additions and 9 deletions

View File

@ -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

View File

@ -5,6 +5,8 @@
# Usage: runtest [options] input_file [perl_args...]
#
use strict;
sub usage
{
print STDERR <<EOF;
@ -12,28 +14,35 @@ sub usage
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 @@ 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";