]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/run-all
bash-5.0-alpha release
[thirdparty/bash.git] / tests / run-all
CommitLineData
726f6388
JA
1#! /bin/sh
2
a0c0a00f
CR
3: ${TMPDIR:=/tmp}
4export TMPDIR
5
6# basic /bin/sh syntax
7SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'`
8
9BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX # for now
10export BASH_TSTOUT
11
9a51695b 12trap 'rm -f $BASH_TSTOUT' 0 1 2 3 15
a0c0a00f 13
d166f048 14PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
726f6388 15export PATH
726f6388 16
d166f048
JA
17# unset BASH_ENV only if it is set
18[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
9a51695b
CR
19# can't reliably do it for SHELLOPTS; SHELLOPTS is readonly in bash
20if [ "${BASH_VERSION+set}" = "set" ]; then
21 export -n SHELLOPTS # just make sure its not exported
22 set +o posix
23 typeset -p SHELLOPTS
24else
25 [ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS 2>/dev/null
26fi
ccc6cda3
JA
27
28: ${THIS_SH:=../bash}
29export THIS_SH
30
d166f048
JA
31${THIS_SH} ./version
32
a0c0a00f 33rm -f ${BASH_TSTOUT}
bb70624e 34
d166f048
JA
35echo Any output from any test, unless otherwise noted, indicates a possible anomaly
36
726f6388
JA
37for x in run-*
38do
39 case $x in
bb70624e 40 $0|run-minimal|run-gprof) ;;
726f6388 41 *.orig|*~) ;;
a0c0a00f 42 *) echo $x ; sh $x ; rm -f ${BASH_TSTOUT} ;;
726f6388
JA
43 esac
44done
45
46exit 0