Mercurial > hg > audiodb
changeset 67:e13b4f62b4f5
Improve the test driver a little bit: display a short description file
if present, and exit with an error status if any test fails. (Also
slightly nicer formatting of incremental progress.)
author | mas01cr |
---|---|
date | Wed, 26 Sep 2007 14:18:07 +0000 |
parents | 4c4c4ca6b59e |
children | 584ae2c7d026 |
files | tests/run-tests.sh |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.sh Wed Sep 26 12:47:20 2007 +0000 +++ b/tests/run-tests.sh Wed Sep 26 14:18:07 2007 +0000 @@ -13,14 +13,27 @@ for file in [0-9][0-9][0-9][0-9]*; do if [ -d ${file} ]; then if [ -f ${file}/run-test.sh ]; then - echo Running test ${file} + echo -n Running test ${file} + if [ -f ${file}/short-description ]; then + awk '{ printf(" (%s)",$0) }' < ${file}/short-description + fi + echo -n : (cd ${file} && sh ./run-test.sh > test.out 2> test.err) EXIT_STATUS=$? if [ ${EXIT_STATUS} -ne 104 ]; then - echo Test ${file} failed: exit status ${EXIT_STATUS} + echo " failed (exit status ${EXIT_STATUS})". + FAILED=true + else + echo " success." fi else echo Skipping test ${file} fi fi done + +if [ -z ${FAILED} ]; then + exit 0 +else + exit 1 +fi