Remove Class::ISA use from autouse tests
[p5sagit/p5-mst-13.2.git] / runtests.SH
CommitLineData
9988b539 1case $PERL_CONFIG_SH in
2'')
3 if test ! -f config.sh; then
4 ln ../config.sh . || \
5 ln ../../config.sh . || \
6 ln ../../../config.sh . || \
7 (echo "Can't find config.sh."; exit 1)
8 fi 2>/dev/null
9 . ./config.sh
10 ;;
11esac
12case "$0" in
13*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
14esac
15echo "Extracting runtests (with variable substitutions)"
16rm -f runtests
17$spitshell >runtests <<!GROK!THIS!
18$startsh -e
19# runtests.SH
20#
21
22export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
23
24case \$# in
25 0)
26 echo "runtests tty_flag ..."
27 exit 1
28 ;;
29esac
30
12a67024 31if test X"\$PERL" = X; then
9988b539 32 echo "please supply PERL in the environment"
33 exit 1
34fi
35
36case \$1 in
37 tty)
38 tty=Y
39 ;;
40 no-tty)
41 tty=N
42 ;;
43 choose)
44 if (true </dev/tty) >/dev/null 2>&1; then
45 tty=Y
46 else
47 tty=N
48 fi
49 ;;
50 *)
51 echo "ttyflag should be one of tty, no-tty or choose"
52 exit 1
53 ;;
54esac
55
12a67024 56if test X"\$TESTFILE" = X; then
9988b539 57 TESTFILE=TEST
58fi
59
60cd t
61rm -f \$PERL
62$lns ../\$PERL \$PERL
63
64# The second branch is for testing without a tty or controlling terminal,
65# see t/op/stat.t
12a67024 66if test \$tty = Y; then
9988b539 67 \$PERL \$TESTFILE \$TEST_ARGS \$TEST_FILES </dev/tty
68else
69 PERL_SKIP_TTY_TEST=1 \$PERL \$TESTFILE \$TEST_ARGS \$TEST_FILES
70fi
71!GROK!THIS!
72$eunicefix runtests
73chmod +x runtests