]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: report failed tests
authorKarel Zak <kzak@redhat.com>
Thu, 21 Apr 2022 08:59:28 +0000 (10:59 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Apr 2022 08:59:28 +0000 (10:59 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
tests/run.sh

index d020bfe88a27425f6fa0a1bf7880b43f368c039b..1bfaec514dc070e63cd77090d00e845bb85695aa 100755 (executable)
@@ -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