summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1999-04-07 19:58:58 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-05-07 09:08:23 +0000
commit994e9bc0b681e44c7053351dd3b29d403ce44b95 (patch)
tree6fdc7c1c32e31ddc877a19bac528aa89dd5deb8c
parentbeb13193c046c5af0b3d82b63bab87b266b7697c (diff)
downloadperl-994e9bc0b681e44c7053351dd3b29d403ce44b95.tar.gz
[perl-5.005.02] detect lack of /dev/tty
Message-Id: <199904080358.XAA01192@mescaline.gnu.org> p4raw-id: //depot/perl@3321
-rw-r--r--Makefile.SH14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile.SH b/Makefile.SH
index 0761c7a068..206514eaa6 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -595,11 +595,21 @@ makedepend: makedepend.SH config.sh
test-prep: miniperl perl preplibrary utilities $(dynamic_ext) $(nonxs_ext)
cd t && (rm -f perl$(EXE_EXT); $(LNS) ../perl$(EXE_EXT) perl$(EXE_EXT))
+# Second branch is for testing without a tty or controling terminal.
+# See t/op/stat.t
test check: test-prep
- cd t && $(LDLIBPTH) ./perl TEST </dev/tty
+ 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
utest ucheck: test-prep
- cd t && $(LDLIBPTH) ./perl UTEST </dev/tty
+ if (true </dev/tty) >/dev/null 2>&1; then \
+ cd t && $(LDLIBPTH) ./perl UTEST </dev/tty; \
+ else \
+ cd t && PERL_SKIP_TTY_TEST=1 $(LDLIBPTH) ./perl UTEST; \
+ fi
# For testing without a tty or controling terminal. See t/op/stat.t
test-notty: test-prep