6 echo RUNNING from
${srcdir}
9 srcdir
=$
(cd $srcdir && pwd)
11 # this should be run from the compiled build directory,
12 # with srcdir= set to wherever the source code is.
13 # not from the tests directory.
14 echo RUNNING from
${srcdir}
18 cat /dev
/null
> failure-outputs.txt
22 for i
in ${srcdir}/tests
/*.sh
25 ${srcdir}/tests
/TEST
*.sh
) continue;;
26 ${srcdir}/tests
/\
*.sh
) continue;;
29 (cd tests
&& sh
$i ${srcdir})
38 cat ${srcdir}/tests
/TESTLIST |
while read name input output options
45 [ "$only" != "" -a "$name" != "$only" ] && continue
46 export SRCDIR
=${srcdir}
47 (cd tests
# run TESTonce in tests directory
48 if ${srcdir}/tests/TESTonce $name ${srcdir}/tests/$input ${srcdir}/tests
/$output "$options"
50 passed
=`expr $passed + 1`
53 failed
=`expr $failed + 1`
56 [ "$only" != "" -a "$name" = "$only" ] && break
58 # I hate shells with their stupid, useless subshells.
75 echo "Usage: $0 [test_name]"
79 # exit with number of failing tests.
80 echo '------------------------------------------------'
81 printf "%4u tests failed\n" $failed
82 printf "%4u tests passed\n" $passed
84 cat failure-outputs.txt