]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/run-all
bash-5.2 distribution sources and documentation
[thirdparty/bash.git] / tests / run-all
CommitLineData
726f6388 1#! /bin/sh
8868edaf
CR
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation, either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15#
726f6388 16
a0c0a00f
CR
17: ${TMPDIR:=/tmp}
18export TMPDIR
19
20# basic /bin/sh syntax
21SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'`
22
23BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX # for now
24export BASH_TSTOUT
25
74091dd4
CR
26trap 'rm -f $BASH_TSTOUT ; exit' 1 2 3 15
27trap 'rm -f $BASH_TSTOUT' 0
a0c0a00f 28
d166f048 29PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
726f6388 30export PATH
726f6388 31
d166f048
JA
32# unset BASH_ENV only if it is set
33[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
d233b485
CR
34# can't reliably do it for SHELLOPTS; SHELLOPTS is readonly in bash
35if [ "${BASH_VERSION+set}" = "set" ]; then
36 export -n SHELLOPTS # just make sure its not exported
37 set +o posix
38 typeset -p SHELLOPTS
39else
40 [ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS 2>/dev/null
41fi
ccc6cda3
JA
42
43: ${THIS_SH:=../bash}
44export THIS_SH
45
8868edaf
CR
46: ${BUILD_DIR:=..}
47export BUILD_DIR
48
d166f048
JA
49${THIS_SH} ./version
50
a0c0a00f 51rm -f ${BASH_TSTOUT}
bb70624e 52
d166f048
JA
53echo Any output from any test, unless otherwise noted, indicates a possible anomaly
54
726f6388
JA
55for x in run-*
56do
57 case $x in
bb70624e 58 $0|run-minimal|run-gprof) ;;
726f6388 59 *.orig|*~) ;;
a0c0a00f 60 *) echo $x ; sh $x ; rm -f ${BASH_TSTOUT} ;;
726f6388
JA
61 esac
62done
63
64exit 0