Mercurial > hg > audiodb
annotate tests/run-tests.sh @ 39:108bd28a8ede
Make the executable to be tested (vaguely) customizeable
author | mas01cr |
---|---|
date | Mon, 17 Sep 2007 11:59:02 +0000 |
parents | 7cc3d6027458 |
children | cb41fb97f7f3 |
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@38 | 16 cd ${file} && sh ./run-test.sh > test.out 2> test.err |
mas01cr@38 | 17 EXIT_STATUS=$? |
mas01cr@38 | 18 if [ ${EXIT_STATUS} -ne 104 ]; then |
mas01cr@38 | 19 echo Test ${file} failed: exit status ${EXIT_STATUS} |
mas01cr@38 | 20 fi |
mas01cr@38 | 21 else |
mas01cr@38 | 22 echo Skipping test ${file} |
mas01cr@38 | 23 fi |
mas01cr@38 | 24 fi |
mas01cr@38 | 25 done |