From 4848ba31acf05a020c7251d31184ec89f70dcf5a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 21 Apr 2022 10:59:28 +0200 Subject: [PATCH] tests: report failed tests Signed-off-by: Karel Zak --- tests/run.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/run.sh b/tests/run.sh index d020bfe88a..1bfaec514d 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -250,14 +250,14 @@ mkdir -p $top_builddir/tests/ printf "%s\n" ${comps[*]} | sort | xargs -I '{}' -P $paraller_jobs -n 1 bash -c "'{}' \"$OPTS\" || - echo 1 >> $top_builddir/tests/failures" + echo '{}' >> $top_builddir/tests/failures" if [ $? != 0 ]; then echo "xargs error" >&2 exit 1 fi + declare -a fail_file fail_file=( $( < $top_builddir/tests/failures ) ) || exit 1 -rm -f $top_builddir/tests/failures echo echo "---------------------------------------------------------------------" if [ ${#fail_file[@]} -eq 0 ]; then @@ -265,7 +265,16 @@ if [ ${#fail_file[@]} -eq 0 ]; then res=0 else echo " ${#fail_file[@]} tests of ${#comps[@]} FAILED" + + echo + for ts in ${fail_file[@]}; do + NAME=$(basename $ts) + COMPONENT=$(basename $(dirname $ts)) + echo " $COMPONENT/$NAME" + done res=1 fi echo "---------------------------------------------------------------------" + +rm -f $top_builddir/tests/failures exit $res -- 2.47.2