tests: quiet successful tests
parent
7b10816cdb
commit
a15d5eefeb
|
@ -7,10 +7,11 @@ failed=0
|
||||||
|
|
||||||
run_test() {
|
run_test() {
|
||||||
local res t_ret 2>/dev/null || true
|
local res t_ret 2>/dev/null || true
|
||||||
|
local cmdline 2>/dev/null || true
|
||||||
|
|
||||||
echo "$ ${1}"
|
cmdline="${1}"
|
||||||
eval res="\$(${1})"
|
|
||||||
echo "${res}"
|
eval res="\$(${1})" 2>/dev/null
|
||||||
|
|
||||||
t_ret=0
|
t_ret=0
|
||||||
while [ ${#} -gt 1 ]; do
|
while [ ${#} -gt 1 ]; do
|
||||||
|
@ -20,20 +21,24 @@ run_test() {
|
||||||
*${1}*)
|
*${1}*)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "! expected ${1}"
|
echo
|
||||||
|
echo "***********************"
|
||||||
|
echo "!!! Test $done failed."
|
||||||
|
echo "!!! $ ${cmdline}"
|
||||||
|
echo "!!! ${res}"
|
||||||
|
echo "!!! expected '${1}' in output"
|
||||||
|
echo "***********************"
|
||||||
t_ret=1
|
t_ret=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ${t_ret} -eq 0 ]; then
|
if [ ${t_ret} -eq 0 ]; then
|
||||||
echo "+ [OK]"
|
echo -n "."
|
||||||
else
|
else
|
||||||
failed=$(( failed + 1 ))
|
failed=$(( failed + 1 ))
|
||||||
fi
|
fi
|
||||||
done=$(( done + 1 ))
|
done=$(( done + 1 ))
|
||||||
|
|
||||||
echo
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selfdir=$(cd "$(dirname "${0}")"; pwd)
|
selfdir=$(cd "$(dirname "${0}")"; pwd)
|
||||||
|
@ -164,6 +169,8 @@ if [ "x@STRICT_MODE@" == "xno" ]; then
|
||||||
'-lfoo' '-I/usr/include/foo' '-fPIC'
|
'-lfoo' '-I/usr/include/foo' '-fPIC'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
if [ ${failed} -gt 0 ]; then
|
if [ ${failed} -gt 0 ]; then
|
||||||
echo "${failed} of ${done} tests failed. See output for details." >&2
|
echo "${failed} of ${done} tests failed. See output for details." >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue