]>
Commit | Line | Data |
---|---|---|
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} |
18 | export TMPDIR | |
19 | ||
20 | # basic /bin/sh syntax | |
21 | SUFFIX=`${THIS_SH} -c 'echo $(( $RANDOM + $BASHPID ))'` | |
22 | ||
23 | BASH_TSTOUT=${TMPDIR}/bashtst-$SUFFIX # for now | |
24 | export BASH_TSTOUT | |
25 | ||
4491c030 CR |
26 | trap 'rm -f $BASH_TSTOUT ; exit' 1 2 3 15 |
27 | trap 'rm -f $BASH_TSTOUT' 0 | |
a0c0a00f | 28 | |
d166f048 | 29 | PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests' |
726f6388 | 30 | export 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 |
35 | if [ "${BASH_VERSION+set}" = "set" ]; then | |
36 | export -n SHELLOPTS # just make sure its not exported | |
37 | set +o posix | |
38 | typeset -p SHELLOPTS | |
39 | else | |
40 | [ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS 2>/dev/null | |
41 | fi | |
ccc6cda3 JA |
42 | |
43 | : ${THIS_SH:=../bash} | |
44 | export THIS_SH | |
45 | ||
8868edaf CR |
46 | : ${BUILD_DIR:=..} |
47 | export BUILD_DIR | |
48 | ||
d166f048 JA |
49 | ${THIS_SH} ./version |
50 | ||
a0c0a00f | 51 | rm -f ${BASH_TSTOUT} |
bb70624e | 52 | |
d166f048 JA |
53 | echo Any output from any test, unless otherwise noted, indicates a possible anomaly |
54 | ||
726f6388 JA |
55 | for x in run-* |
56 | do | |
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 |
62 | done | |
63 | ||
64 | exit 0 |