Use the normal perl interpreter for test scripts that don't need to

call Windows APIs.
Don't build winetest.exe by default.
oldstable
Alexandre Julliard 2002-07-31 23:23:32 +00:00
parent cd6b50e732
commit c754a89b94
5 changed files with 14 additions and 17 deletions

View File

@ -82,7 +82,6 @@ LIBTSX11 = -L$(TOPOBJDIR)/tsx11 -lwine_tsx11
LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode
LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid
WINETEST = $(TOPOBJDIR)/programs/winetest/winetest.exe$(DLLEXT)
RUNTEST = $(TOPSRCDIR)/programs/winetest/runtest
RUNTESTFLAGS = -q -P wine -M $(MODULE) -T $(TOPOBJDIR)
TESTRESULTS = $(PLTESTS:.pl=.ok) $(CTESTS:.c=.ok)
@ -157,7 +156,7 @@ LINTS = $(C_SRCS:.c=.ln)
$(RUNTEST) $(RUNTESTFLAGS) -p $(TESTPROGRAM)$(DLLEXT) $< && touch $@
.pl.ok:
$(RUNTEST) $(RUNTESTFLAGS) $< && touch $@
$(RUNTEST) $(RUNTESTFLAGS) $(PLTESTPROGRAM:%=-p %) $< && touch $@
# 'all' target first in case the enclosing Makefile didn't define any target
@ -293,12 +292,9 @@ $(SUBDIRS:%=%/__test__): dummy
.PHONY: check test $(SUBDIRS:%=%/__test__)
$(PLTESTS:.c=.ok): $(WINETEST)
$(PLTESTS:.pl=.ok): $(PLTESTPROGRAM)
$(CTESTS:.c=.ok): $(TESTPROGRAM)$(DLLEXT)
$(WINETEST):
cd $(TOPOBJDIR)/programs/winetest && $(MAKE) winetest.exe$(DLLEXT)
$(TESTMAIN):
cd $(TOPOBJDIR)/programs/winetest && $(MAKE) wtmain.o

View File

@ -128,7 +128,7 @@ checklink::
@cd programs && $(MAKE) checklink
test_environment: dummy
@cd programs/winetest && $(MAKE) all
@cd programs/winetest && $(MAKE) test_environment
$(TESTSUBDIRS:%=%/__test__): test_environment

View File

@ -51,8 +51,7 @@ INSTALLPROGS = \
# Symlinks to apps that we want to run from inside the source tree
SYMLINKS = \
wineconsole.exe \
winedbg.exe \
winetest.exe
winedbg.exe
@MAKE_RULES@
@ -108,11 +107,7 @@ wineconsole.exe$(DLLEXT): wineconsole/wineconsole.exe$(DLLEXT)
winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT)
$(RM) $@ && $(LN_S) $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT) $@
winetest.exe$(DLLEXT): winetest/winetest.exe$(DLLEXT)
$(RM) $@ && $(LN_S) winetest/winetest.exe$(DLLEXT) $@
wineconsole/wineconsole.exe$(DLLEXT): wineconsole
$(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger
winetest/winetest.exe$(DLLEXT): winetest
### Dependencies:

View File

@ -18,12 +18,17 @@ EXTRA_OBJS = wine.o
EXTRASUBDIRS = include tests
PLTESTPROGRAM = $(MODULE)$(DLLEXT)
PLTESTS = \
tests/wine.pl
# override all: target so that we don't build the Perl stuff by default
test_environment: wtmain.o
@MAKE_PROG_RULES@
all: wtmain.o
all: test_environment
wine.c: wine.xs
perl $(XSUBPPDIR)/xsubpp -typemap $(XSUBPPDIR)/typemap $(SRCDIR)/wine.xs >wine.c || $(RM) wine.c
@ -31,4 +36,6 @@ wine.c: wine.xs
clean::
$(RM) wine.c
.PHONY: test_environment
### Dependencies:

View File

@ -115,7 +115,7 @@ if (@modules)
}
# set environment variables needed for Wine
if (defined($topobjdir))
if (defined($topobjdir) && defined($program))
{
chop($topobjdir = `cd $topobjdir && pwd`);
$ENV{LD_LIBRARY_PATH} = $topobjdir . ":" . $ENV{LD_LIBRARY_PATH};
@ -123,7 +123,6 @@ if (defined($topobjdir))
$ENV{WINESERVER} = $topobjdir . "/server/wineserver";
$ENV{WINELOADER} = $topobjdir . "/wine";
$ENV{WINETEST_PLATFORM} = $platform || "wine";
$program ||= "winetest.exe";
exec $ENV{WINELOADER}, $program, $infile, @ARGV;
}
else
@ -132,7 +131,7 @@ else
}
# and now exec the program
$program ||= "winetest.exe";
$program ||= "perl";
exec $program, $infile, @ARGV;
print STDERR "Could not exec $program\n";
exit 1;