]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/run-minimal
bash-5.1 distribution sources and documentation
[thirdparty/bash.git] / tests / run-minimal
1 #! /bin/sh
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 #
16 #
17 # run-minimal - a version of run-all for shells configured with
18 # --enable-minimal-config
19 #
20
21 : ${TMPDIR:=/tmp}
22 export TMPDIR
23
24 # basic /bin/sh syntax
25 SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'`
26
27 BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX # for now
28 export BASH_TSTOUT
29
30 trap 'rm -f $BASH_TSTOUT' 0
31
32 PATH=.:$PATH # just to get the right version of printenv
33 export PATH
34
35 # unset BASH_ENV only if it is set
36 [ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
37 # ditto for SHELLOPTS
38 #[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
39
40 : ${THIS_SH:=../bash}
41 export THIS_SH
42
43 : ${BUILD_DIR:=..}
44 export BUILD_DIR
45
46 ${THIS_SH} ./version.mini
47
48 rm -f "$BASH_TSTOUT"
49
50 echo Testing ${THIS_SH}
51 echo Any output from any test, unless otherwise noted, indicates a possible anomaly
52 for x in run-*
53 do
54 case $x in
55 $0) ;;
56 *.orig|*~) ;;
57 run-dollars|run-execscript|run-func|run-getopts|run-heredoc) echo $x ; sh $x ;;
58 run-ifs-tests|run-input-test|run-invert|run-more-exp|run-nquote) echo $x ; sh $x ;;
59 run-ifs-posix|run-posix2|run-posixpat|run-posixpipe) echo $x ; sh $x ;;
60 run-precedence|run-quote|run-read|run-rhs-exp|run-strip|run-tilde) echo $x ; sh $x ;;
61 run-dynvar) echo $x ; sh $x ;;
62 ;;
63 *) ;;
64 esac
65 rm -f "$BASH_TSTOUT"
66 done
67
68 exit 0