init version.
[bush.git] / tests / tmp / run-minimal
blobf2d04f85e0d1600d43975429f6558ee12e85eb8b
1 #! /bin/sh
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.
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.
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/>.
17 # run-minimal - a version of run-all for shells configured with
18 # --enable-minimal-config
21 : ${TMPDIR:=/tmp}
22 export TMPDIR
24 # basic /bin/sh syntax
25 SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BUSHPID ))'`
27 BUSH_TSTOUT=${TMPDIR}/bushtst-$SUFFIX # for now
28 export BUSH_TSTOUT
30 trap 'rm -f $BUSH_TSTOUT' 0
32 PATH=.:$PATH # just to get the right version of printenv
33 export PATH
35 # unset BUSH_ENV only if it is set
36 [ "${BUSH_ENV+set}" = "set" ] && unset BUSH_ENV
37 # ditto for SHELLOPTS
38 #[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
40 : ${THIS_SH:=../bush}
41 export THIS_SH
43 : ${BUILD_DIR:=..}
44 export BUILD_DIR
46 ${THIS_SH} ./version.mini
48 rm -f "$BUSH_TSTOUT"
50 echo Testing ${THIS_SH}
51 echo Any output from any test, unless otherwise noted, indicates a possible anomaly
52 for x in run-*
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 ;;
63 *) ;;
64 esac
65 rm -f "$BUSH_TSTOUT"
66 done
68 exit 0