3 case $PERL_CONFIG_SH in
5 if test ! -f config.sh; then
7 ln ../../config.sh . || \
8 ln ../../../config.sh . || \
9 (echo "Can't find config.sh."; exit 1)
15 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
17 echo "Extracting runtests (with variable substitutions)"
20 $spitshell >runtests <<!GROK!THIS!
26 ## In the following, dollars and backticks do not need the extra backslash.
27 $spitshell >>runtests <<'!NO!SUBS!'
29 export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh $0; kill $$)
33 echo "runtests tty_flag ..."
46 if (true </dev/tty) >/dev/null 2>&1; then
53 echo "ttyflag should be one of tty, no-tty or choose"
58 if test X"$TESTFILE" = X; then
64 # If this is run under an old shell that doesn't automatically
65 # update PWD, then we must update it. Otherwise, t/io/fs.t gets
66 # mixed up about what directory we are in.
68 '') ;; # Do nothing if it isn't set at all.
69 */t) ;; # Leave it alone if it's properly updated.
70 *) PWD=${PWD}/t; export PWD ;; # Otherwise, fix it.
75 ## In the following, dollars and backticks do need the extra backslash.
76 $spitshell >>runtests <<!GROK!THIS!
77 # The second branch is for testing without a tty or controlling terminal,
79 if test \$tty = Y; then
80 ./perl$_exe \$TESTFILE \$TEST_ARGS \$TEST_FILES </dev/tty
82 PERL_SKIP_TTY_TEST=1 ./perl$_exe \$TESTFILE \$TEST_ARGS \$TEST_FILES
85 echo "Ran tests" > rantests