summaryrefslogtreecommitdiff
path: root/Makefile.SH
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-18 23:25:20 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-18 23:25:20 +0000
commitec861bc19fa3da942464628dd3e86e9b82994ca4 (patch)
tree5f6b53b1359187a9be5e5d6e2cfeca0fbc940bde /Makefile.SH
parent09187cb170014b7d158b84fa92795ed1ad2ae0d7 (diff)
downloadperl-ec861bc19fa3da942464628dd3e86e9b82994ca4.tar.gz
Rewrite the tests section of Makefile to be less redundant
and to allow for more flexible test targets, many recursive make calls introduced. p4raw-id: //depot/perl@9217
Diffstat (limited to 'Makefile.SH')
-rw-r--r--Makefile.SH81
1 files changed, 42 insertions, 39 deletions
diff --git a/Makefile.SH b/Makefile.SH
index a6ec71b939..416f66e198 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -837,31 +837,55 @@ depend: makedepend
makedepend: makedepend.SH config.sh
sh ./makedepend.SH
-# Cannot delegate rebuilding of t/perl to make to allow interlaced
-# test and minitest
-test-prep: miniperl perl preplibrary utilities $(dynamic_ext) $(nonxs_ext) $(TEST_PERL_DLL)
- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT))
+# Cannot delegate rebuilding of t/perl to make
+# to allow interlaced test and minitest
-# Second branch is for testing without a tty or controling terminal.
-# See t/op/stat.t
-test check: test-prep
- if (true </dev/tty) >/dev/null 2>&1; then \
- cd t && $(LDLIBPTH) ./perl TEST </dev/tty; \
- else \
- cd t && PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) ./perl TEST; \
- fi
- @echo "Ran tests" > t/rantests
+_test-prep: miniperl $(PERL)$(EXE_EXT) preplibrary utilities $(dynamic_ext) $(nonxs_ext) $(TEST_PERL_DLL)
+ cd t && (rm -f $(PERL)$(EXE_EXT); $(LNS) ../$(PERL)$(EXE_EXT) $(PERL)$(EXE_EXT))
-utest ucheck: test-prep
+test-prep:
+ PERL=./perl $(MAKE) _test-prep
+
+_test-tty:
+ cd t && $(LDLIBPTH) $(PERL_DEBUG) $(PERL) TEST $(UTF8) </dev/tty
+
+_test-notty:
+ cd t && $(LDLIBPTH) $(PERL_DEBUG) PERL_SKIP_TTY_TEST=1 $(PERL) TEST $(UTF8)
+
+# The second branch is for testing without a tty or controlling terminal,
+# see t/op/stat.t
+_test:
if (true </dev/tty) >/dev/null 2>&1; then \
- cd t && $(LDLIBPTH) ./perl TEST -utf8 </dev/tty; \
+ $(MAKE) _test-tty; \
else \
- cd t && PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) ./perl TEST -utf8; \
+ $(MAKE) _test-notty; \
fi
-# For testing without a tty or controling terminal. See t/op/stat.t
+test check: test-prep
+ PERL=./perl $(MAKE) _test
+
+test-tty: test-prep
+ PERL=./perl $(MAKE) _test-tty
+
test-notty: test-prep
- cd t && PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) ./perl TEST
+ PERL=./perl $(MAKE) _test-notty
+
+utest ucheck: test-prep
+ PERL=./perl UTF8=-utf8 $(MAKE) _test
+
+# Targets for Third Degree testing.
+
+test-prep.third:
+ PERL=./perl.third $(MAKE) _test-prep
+
+test.third check.third: test-prep.third perl.third
+ PERL=./perl.third PERL_DEBUG=PERL_3LOG=1 $(MAKE) _test
+
+utest.third ucheck.third: test-prep.third perl.third
+ PERL=./perl.third PERL_DEBUG=PERL_3LOG=1UTF=-utf8 $(MAKE) _test
+
+test-notty.third: test-prep.third perl.third
+ PERL=./perl.third $(MAKE) PERL_DEBUG=PERL_3LOG=1 _test-notty
# Can't depend on lib/Config.pm because that might be where miniperl
# is crashing.
@@ -871,27 +895,6 @@ minitest: miniperl lib/re.pm
- cd t && (rm -f perl$(EXE_EXT); $(LNS) ../miniperl$(EXE_EXT) perl$(EXE_EXT)) \
&& $(LDLIBPTH) ./perl TEST base/*.t comp/*.t cmd/*.t run/*.t io/*.t op/*.t pragma/*.t </dev/tty
-# Targets for Third Degree testing.
-
-test.third check.third: test-prep perl.third
- if (true </dev/tty) >/dev/null 2>&1; then \
- cd t && $(LDLIBPTH) PERL_3LOG=1 ./perl.third TEST </dev/tty; \
- else \
- cd t && PERL_SKIP_TTY_TEST=1 PERL_3LOG=1 $(LDLIBPTH) ./perl TEST; \
- fi
- @echo "Ran tests" > t/rantests
-
-utest.third ucheck.third: test-prep perl.third
- if (true </dev/tty) >/dev/null 2>&1; then \
- cd t && $(LDLIBPTH) PERL_3LOG=1 ./perl.third TEST -utf8 </dev/tty; \
- else \
- cd t && PERL_SKIP_TTY_TEST=1 PERL_3LOG=1 $(LDLIBPTH) ./perl TEST -utf8; \
- fi
-
-# For testing without a tty or controling terminal. See t/op/stat.t
-test-notty.third: test-prep perl.third
- cd t && PERL_SKIP_TTY_TEST=1 PERL_3LOG=1 $(LDLIBPTH) ./perl.third TEST
-
# Handy way to run perlbug -ok without having to install and run the
# installed perlbug. We don't re-run the tests here - we trust the user.
# Please *don't* use this unless all tests pass.