Mercurial > hg > audiodb
annotate tests/run-tests.sh @ 119:6062e6f1dcc1 endian-neutral
Towards endian-neutrality, part 4.
A little bit of defensive coding around the byte_swap() Do What I Mean
functionality: if the maximum acceptable dimensionality exceeds 16 bits,
then the byte swapping is no longer ambiguous.
author | mas01cr |
---|---|
date | Fri, 12 Oct 2007 12:58:30 +0000 |
parents | 1fc7f47b422b |
children | 218106b4db14 |
rev | line source |
---|---|
mas01cr@38 | 1 #! /bin/sh |
mas01cr@38 | 2 |
mas01cr@39 | 3 AUDIODB=../../${EXECUTABLE:-audioDB} |
mas01cr@39 | 4 export AUDIODB |
mas01cr@39 | 5 |
mas01cr@39 | 6 if [ -x ${AUDIODB:3} ]; then |
mas01cr@39 | 7 : |
mas01cr@39 | 8 else |
mas01cr@39 | 9 echo Cannot execute audioDB: ${AUDIODB:3} |
mas01cr@39 | 10 exit 1 |
mas01cr@39 | 11 fi |
mas01cr@39 | 12 |
mas01cr@38 | 13 for file in [0-9][0-9][0-9][0-9]*; do |
mas01cr@38 | 14 if [ -d ${file} ]; then |
mas01cr@38 | 15 if [ -f ${file}/run-test.sh ]; then |
mas01cr@67 | 16 echo -n Running test ${file} |
mas01cr@67 | 17 if [ -f ${file}/short-description ]; then |
mas01cr@67 | 18 awk '{ printf(" (%s)",$0) }' < ${file}/short-description |
mas01cr@67 | 19 fi |
mas01cr@67 | 20 echo -n : |
mas01cr@41 | 21 (cd ${file} && sh ./run-test.sh > test.out 2> test.err) |
mas01cr@38 | 22 EXIT_STATUS=$? |
mas01cr@38 | 23 if [ ${EXIT_STATUS} -ne 104 ]; then |
mas01cr@67 | 24 echo " failed (exit status ${EXIT_STATUS})". |
mas01cr@67 | 25 FAILED=true |
mas01cr@67 | 26 else |
mas01cr@67 | 27 echo " success." |
mas01cr@38 | 28 fi |
mas01cr@38 | 29 else |
mas01cr@38 | 30 echo Skipping test ${file} |
mas01cr@38 | 31 fi |
mas01cr@38 | 32 fi |
mas01cr@38 | 33 done |
mas01cr@67 | 34 |
mas01cr@73 | 35 if [ -z "${FAILED}" ]; then |
mas01cr@67 | 36 exit 0 |
mas01cr@67 | 37 else |
mas01cr@67 | 38 exit 1 |
mas01cr@67 | 39 fi |