This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Preallocate HvAUX() structures for large bucket arrays
[perl5.git] / runtests.SH
CommitLineData
1f00b0d6
S
1#!/bin/sh
2
9988b539
NC
3case $PERL_CONFIG_SH in
4'')
5 if test ! -f config.sh; then
6 ln ../config.sh . || \
7 ln ../../config.sh . || \
8 ln ../../../config.sh . || \
9 (echo "Can't find config.sh."; exit 1)
10 fi 2>/dev/null
11 . ./config.sh
12 ;;
13esac
14case "$0" in
15*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
16esac
17echo "Extracting runtests (with variable substitutions)"
18rm -f runtests
19$spitshell >runtests <<!GROK!THIS!
20$startsh -e
21# runtests.SH
22#
23
24export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$)
25
26case \$# in
27 0)
28 echo "runtests tty_flag ..."
29 exit 1
30 ;;
31esac
32
9988b539
NC
33case \$1 in
34 tty)
35 tty=Y
36 ;;
37 no-tty)
38 tty=N
39 ;;
40 choose)
41 if (true </dev/tty) >/dev/null 2>&1; then
42 tty=Y
43 else
44 tty=N
45 fi
46 ;;
47 *)
48 echo "ttyflag should be one of tty, no-tty or choose"
49 exit 1
50 ;;
51esac
52
12a67024 53if test X"\$TESTFILE" = X; then
9988b539
NC
54 TESTFILE=TEST
55fi
56
57cd t
9988b539
NC
58
59# The second branch is for testing without a tty or controlling terminal,
60# see t/op/stat.t
12a67024 61if test \$tty = Y; then
463c96de 62 ./perl$_exe \$TESTFILE \$TEST_ARGS \$TEST_FILES </dev/tty
9988b539 63else
463c96de 64 PERL_SKIP_TTY_TEST=1 ./perl$_exe \$TESTFILE \$TEST_ARGS \$TEST_FILES
9988b539 65fi
6fa4dacc
NC
66
67echo "Ran tests" > rantests
9988b539
NC
68!GROK!THIS!
69$eunicefix runtests
70chmod +x runtests