Mercurial > hg > audiodb
annotate tests/run-tests.sh @ 41:cb41fb97f7f3
Make run-tests work with more than one test directory
author | mas01cr |
---|---|
date | Mon, 17 Sep 2007 12:12:30 +0000 |
parents | 108bd28a8ede |
children | e13b4f62b4f5 |
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@41 | 16 echo Running test ${file} |
mas01cr@41 | 17 (cd ${file} && sh ./run-test.sh > test.out 2> test.err) |
mas01cr@38 | 18 EXIT_STATUS=$? |
mas01cr@38 | 19 if [ ${EXIT_STATUS} -ne 104 ]; then |
mas01cr@38 | 20 echo Test ${file} failed: exit status ${EXIT_STATUS} |
mas01cr@38 | 21 fi |
mas01cr@38 | 22 else |
mas01cr@38 | 23 echo Skipping test ${file} |
mas01cr@38 | 24 fi |
mas01cr@38 | 25 fi |
mas01cr@38 | 26 done |