TESTS: change the output of run-unittests.sh
- "check" is run with sh -e so it will stop at the first error - output of "check" is not shown anymore - add a line with the name of the failed test
This commit is contained in:
parent
e900ef987e
commit
7fdc4160b2
@ -52,7 +52,7 @@ testlist=
|
|||||||
echo "########################## Gathering tests to run ##########################"
|
echo "########################## Gathering tests to run ##########################"
|
||||||
|
|
||||||
for test in $(find "$TESTDIR" -name "*.sh"); do
|
for test in $(find "$TESTDIR" -name "*.sh"); do
|
||||||
sh ${test} check
|
sh -e ${test} check 2>&1 1>/dev/null
|
||||||
r="$?"
|
r="$?"
|
||||||
if [ "$r" = "0" ]; then
|
if [ "$r" = "0" ]; then
|
||||||
echo " Add test: $test"
|
echo " Add test: $test"
|
||||||
@ -70,10 +70,10 @@ for TEST in $testlist; do
|
|||||||
export TEST
|
export TEST
|
||||||
export TESTDIR=`dirname ${TEST}`
|
export TESTDIR=`dirname ${TEST}`
|
||||||
|
|
||||||
sh -e ${TEST} run
|
sh -e ${TEST} run 2>&1 1>/dev/null
|
||||||
r="$?"
|
r="$?"
|
||||||
# echo "*** result ${TEST}: $r"
|
|
||||||
if [ "$r" != "0" ]; then
|
if [ "$r" != "0" ]; then
|
||||||
|
echo "Test ${TEST} failed: $r"
|
||||||
result=$r
|
result=$r
|
||||||
failed=$((failed+1))
|
failed=$((failed+1))
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user