From c754a89b940fde8dc4d5580a8afd35dbad0ea181 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 31 Jul 2002 23:23:32 +0000 Subject: [PATCH] Use the normal perl interpreter for test scripts that don't need to call Windows APIs. Don't build winetest.exe by default. --- Make.rules.in | 8 ++------ Makefile.in | 2 +- programs/Makefile.in | 7 +------ programs/winetest/Makefile.in | 9 ++++++++- programs/winetest/runtest | 5 ++--- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index edc56ba2f22..52aae5054a1 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -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 diff --git a/Makefile.in b/Makefile.in index 92238dc1a39..7012b11daa4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 diff --git a/programs/Makefile.in b/programs/Makefile.in index b0bb486906f..a708bacda3f 100644 --- a/programs/Makefile.in +++ b/programs/Makefile.in @@ -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: diff --git a/programs/winetest/Makefile.in b/programs/winetest/Makefile.in index 04f52f6e462..b5c6786dafa 100644 --- a/programs/winetest/Makefile.in +++ b/programs/winetest/Makefile.in @@ -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: diff --git a/programs/winetest/runtest b/programs/winetest/runtest index 9c6afc46ba3..839b64aba2a 100755 --- a/programs/winetest/runtest +++ b/programs/winetest/runtest @@ -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; -- 2.11.4.GIT