check: print more details after 'make check'

Version: 3.2.1-2
This commit is contained in:
Pavel Raiskup 2016-07-18 16:21:24 +02:00
parent e4bfe11204
commit 41018e76a9

View File

@ -1,6 +1,6 @@
Name: libarchive Name: libarchive
Version: 3.2.1 Version: 3.2.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: A library for handling streaming archive formats Summary: A library for handling streaming archive formats
License: BSD License: BSD
@ -115,19 +115,43 @@ done
%check %check
run_testsuite() logfiles ()
{ {
find -name '*_test.log' -or -name test-suite.log
}
tempdirs ()
{
cat `logfiles` \
| awk "match(\$0, /[^[:space:]]*`date -I`[^[:space:]]*/) { print substr(\$0, RSTART, RLENGTH); }" \
| sort | uniq
}
cat_logs ()
{
for i in `logfiles`
do
echo "=== $i ==="
cat "$i"
done
}
run_testsuite ()
{
rc=0
LD_LIBRARY_PATH=`pwd`/.libs make %{?_smp_mflags} check -j1 || { LD_LIBRARY_PATH=`pwd`/.libs make %{?_smp_mflags} check -j1 || {
# error happened - try to extract in koji as much info as possible # error happened - try to extract in koji as much info as possible
cat test-suite.log cat_logs
echo "========================="
err=`cat test-suite.log | grep "Details for failing tests" | cut -d: -f2` for i in `tempdirs`; do
for i in $err; do if test -d "$i" ; then
find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n" find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n"
cat $i/*.log cat $i/*.log
fi
done done
return 1 return 1
} }
cat_logs
} }
# On a ppc/ppc64 is some race condition causing 'make check' fail on ppc # On a ppc/ppc64 is some race condition causing 'make check' fail on ppc
@ -186,6 +210,9 @@ run_testsuite
%changelog %changelog
* Mon Jul 18 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.1-2
- print more detailed logs for testsuite, even if testsuite succeeded
* Mon Jun 20 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.1-1 * Mon Jun 20 2016 Pavel Raiskup <praiskup@redhat.com> - 3.2.1-1
- rebase, several security issues fixed (rhbz#1348194) - rebase, several security issues fixed (rhbz#1348194)