# HG changeset patch # User mas01cr # Date 1190816287 0 # Node ID e13b4f62b4f522131a2d944fb65b71783e74b538 # Parent 4c4c4ca6b59efe4817ad723d5c11301229480db0 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.) diff -r 4c4c4ca6b59e -r e13b4f62b4f5 tests/run-tests.sh --- 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