From a15d5eefebd2da68e0ce6873befce136b898c290 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 25 Jul 2012 17:47:09 -0500 Subject: [PATCH] tests: quiet successful tests --- tests/run.sh.in | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/run.sh.in b/tests/run.sh.in index 6a2f7e3..0ef9069 100644 --- a/tests/run.sh.in +++ b/tests/run.sh.in @@ -7,10 +7,11 @@ failed=0 run_test() { local res t_ret 2>/dev/null || true + local cmdline 2>/dev/null || true - echo "$ ${1}" - eval res="\$(${1})" - echo "${res}" + cmdline="${1}" + + eval res="\$(${1})" 2>/dev/null t_ret=0 while [ ${#} -gt 1 ]; do @@ -20,20 +21,24 @@ run_test() { *${1}*) ;; *) - echo "! expected ${1}" + echo + echo "***********************" + echo "!!! Test $done failed." + echo "!!! $ ${cmdline}" + echo "!!! ${res}" + echo "!!! expected '${1}' in output" + echo "***********************" t_ret=1 ;; esac done if [ ${t_ret} -eq 0 ]; then - echo "+ [OK]" + echo -n "." else failed=$(( failed + 1 )) fi done=$(( done + 1 )) - - echo } selfdir=$(cd "$(dirname "${0}")"; pwd) @@ -164,6 +169,8 @@ if [ "x@STRICT_MODE@" == "xno" ]; then '-lfoo' '-I/usr/include/foo' '-fPIC' fi +echo + if [ ${failed} -gt 0 ]; then echo "${failed} of ${done} tests failed. See output for details." >&2 exit 1