Commit c754a89b authored by Alexandre Julliard's avatar Alexandre Julliard

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

call Windows APIs. Don't build winetest.exe by default.
parent cd6b50e7
...@@ -82,7 +82,6 @@ LIBTSX11 = -L$(TOPOBJDIR)/tsx11 -lwine_tsx11 ...@@ -82,7 +82,6 @@ LIBTSX11 = -L$(TOPOBJDIR)/tsx11 -lwine_tsx11
LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode LIBUNICODE= -L$(TOPOBJDIR)/unicode -lwine_unicode
LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid LIBUUID = -L$(TOPOBJDIR)/ole -lwine_uuid
WINETEST = $(TOPOBJDIR)/programs/winetest/winetest.exe$(DLLEXT)
RUNTEST = $(TOPSRCDIR)/programs/winetest/runtest RUNTEST = $(TOPSRCDIR)/programs/winetest/runtest
RUNTESTFLAGS = -q -P wine -M $(MODULE) -T $(TOPOBJDIR) RUNTESTFLAGS = -q -P wine -M $(MODULE) -T $(TOPOBJDIR)
TESTRESULTS = $(PLTESTS:.pl=.ok) $(CTESTS:.c=.ok) TESTRESULTS = $(PLTESTS:.pl=.ok) $(CTESTS:.c=.ok)
...@@ -157,7 +156,7 @@ LINTS = $(C_SRCS:.c=.ln) ...@@ -157,7 +156,7 @@ LINTS = $(C_SRCS:.c=.ln)
$(RUNTEST) $(RUNTESTFLAGS) -p $(TESTPROGRAM)$(DLLEXT) $< && touch $@ $(RUNTEST) $(RUNTESTFLAGS) -p $(TESTPROGRAM)$(DLLEXT) $< && touch $@
.pl.ok: .pl.ok:
$(RUNTEST) $(RUNTESTFLAGS) $< && touch $@ $(RUNTEST) $(RUNTESTFLAGS) $(PLTESTPROGRAM:%=-p %) $< && touch $@
# 'all' target first in case the enclosing Makefile didn't define any target # 'all' target first in case the enclosing Makefile didn't define any target
...@@ -293,12 +292,9 @@ $(SUBDIRS:%=%/__test__): dummy ...@@ -293,12 +292,9 @@ $(SUBDIRS:%=%/__test__): dummy
.PHONY: check test $(SUBDIRS:%=%/__test__) .PHONY: check test $(SUBDIRS:%=%/__test__)
$(PLTESTS:.c=.ok): $(WINETEST) $(PLTESTS:.pl=.ok): $(PLTESTPROGRAM)
$(CTESTS:.c=.ok): $(TESTPROGRAM)$(DLLEXT) $(CTESTS:.c=.ok): $(TESTPROGRAM)$(DLLEXT)
$(WINETEST):
cd $(TOPOBJDIR)/programs/winetest && $(MAKE) winetest.exe$(DLLEXT)
$(TESTMAIN): $(TESTMAIN):
cd $(TOPOBJDIR)/programs/winetest && $(MAKE) wtmain.o cd $(TOPOBJDIR)/programs/winetest && $(MAKE) wtmain.o
......
...@@ -128,7 +128,7 @@ checklink:: ...@@ -128,7 +128,7 @@ checklink::
@cd programs && $(MAKE) checklink @cd programs && $(MAKE) checklink
test_environment: dummy test_environment: dummy
@cd programs/winetest && $(MAKE) all @cd programs/winetest && $(MAKE) test_environment
$(TESTSUBDIRS:%=%/__test__): test_environment $(TESTSUBDIRS:%=%/__test__): test_environment
......
...@@ -51,8 +51,7 @@ INSTALLPROGS = \ ...@@ -51,8 +51,7 @@ INSTALLPROGS = \
# Symlinks to apps that we want to run from inside the source tree # Symlinks to apps that we want to run from inside the source tree
SYMLINKS = \ SYMLINKS = \
wineconsole.exe \ wineconsole.exe \
winedbg.exe \ winedbg.exe
winetest.exe
@MAKE_RULES@ @MAKE_RULES@
...@@ -108,11 +107,7 @@ wineconsole.exe$(DLLEXT): wineconsole/wineconsole.exe$(DLLEXT) ...@@ -108,11 +107,7 @@ wineconsole.exe$(DLLEXT): wineconsole/wineconsole.exe$(DLLEXT)
winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT) winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT)
$(RM) $@ && $(LN_S) $(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 wineconsole/wineconsole.exe$(DLLEXT): wineconsole
$(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger $(TOPOBJDIR)/debugger/winedbg.exe$(DLLEXT): $(TOPOBJDIR)/debugger
winetest/winetest.exe$(DLLEXT): winetest
### Dependencies: ### Dependencies:
...@@ -18,12 +18,17 @@ EXTRA_OBJS = wine.o ...@@ -18,12 +18,17 @@ EXTRA_OBJS = wine.o
EXTRASUBDIRS = include tests EXTRASUBDIRS = include tests
PLTESTPROGRAM = $(MODULE)$(DLLEXT)
PLTESTS = \ PLTESTS = \
tests/wine.pl tests/wine.pl
# override all: target so that we don't build the Perl stuff by default
test_environment: wtmain.o
@MAKE_PROG_RULES@ @MAKE_PROG_RULES@
all: wtmain.o all: test_environment
wine.c: wine.xs wine.c: wine.xs
perl $(XSUBPPDIR)/xsubpp -typemap $(XSUBPPDIR)/typemap $(SRCDIR)/wine.xs >wine.c || $(RM) wine.c perl $(XSUBPPDIR)/xsubpp -typemap $(XSUBPPDIR)/typemap $(SRCDIR)/wine.xs >wine.c || $(RM) wine.c
...@@ -31,4 +36,6 @@ wine.c: wine.xs ...@@ -31,4 +36,6 @@ wine.c: wine.xs
clean:: clean::
$(RM) wine.c $(RM) wine.c
.PHONY: test_environment
### Dependencies: ### Dependencies:
...@@ -115,7 +115,7 @@ if (@modules) ...@@ -115,7 +115,7 @@ if (@modules)
} }
# set environment variables needed for Wine # set environment variables needed for Wine
if (defined($topobjdir)) if (defined($topobjdir) && defined($program))
{ {
chop($topobjdir = `cd $topobjdir && pwd`); chop($topobjdir = `cd $topobjdir && pwd`);
$ENV{LD_LIBRARY_PATH} = $topobjdir . ":" . $ENV{LD_LIBRARY_PATH}; $ENV{LD_LIBRARY_PATH} = $topobjdir . ":" . $ENV{LD_LIBRARY_PATH};
...@@ -123,7 +123,6 @@ if (defined($topobjdir)) ...@@ -123,7 +123,6 @@ if (defined($topobjdir))
$ENV{WINESERVER} = $topobjdir . "/server/wineserver"; $ENV{WINESERVER} = $topobjdir . "/server/wineserver";
$ENV{WINELOADER} = $topobjdir . "/wine"; $ENV{WINELOADER} = $topobjdir . "/wine";
$ENV{WINETEST_PLATFORM} = $platform || "wine"; $ENV{WINETEST_PLATFORM} = $platform || "wine";
$program ||= "winetest.exe";
exec $ENV{WINELOADER}, $program, $infile, @ARGV; exec $ENV{WINELOADER}, $program, $infile, @ARGV;
} }
else else
...@@ -132,7 +131,7 @@ else ...@@ -132,7 +131,7 @@ else
} }
# and now exec the program # and now exec the program
$program ||= "winetest.exe"; $program ||= "perl";
exec $program, $infile, @ARGV; exec $program, $infile, @ARGV;
print STDERR "Could not exec $program\n"; print STDERR "Could not exec $program\n";
exit 1; exit 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment