From: Karel Zak Date: Thu, 21 Apr 2022 08:59:28 +0000 (+0200) Subject: tests: report failed tests X-Git-Tag: v2.39-rc1~700 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4848ba31acf05a020c7251d31184ec89f70dcf5a;p=thirdparty%2Futil-linux.git tests: report failed tests Signed-off-by: Karel Zak --- 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