check: print more details after 'make check'
Version: 3.2.1-2
This commit is contained in:
parent
e4bfe11204
commit
41018e76a9
@ -1,6 +1,6 @@
|
||||
Name: libarchive
|
||||
Version: 3.2.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A library for handling streaming archive formats
|
||||
|
||||
License: BSD
|
||||
@ -115,19 +115,43 @@ done
|
||||
|
||||
|
||||
%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 || {
|
||||
# error happened - try to extract in koji as much info as possible
|
||||
cat test-suite.log
|
||||
echo "========================="
|
||||
err=`cat test-suite.log | grep "Details for failing tests" | cut -d: -f2`
|
||||
for i in $err; do
|
||||
cat_logs
|
||||
|
||||
for i in `tempdirs`; do
|
||||
if test -d "$i" ; then
|
||||
find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n"
|
||||
cat $i/*.log
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
cat_logs
|
||||
}
|
||||
|
||||
# On a ppc/ppc64 is some race condition causing 'make check' fail on ppc
|
||||
@ -186,6 +210,9 @@ run_testsuite
|
||||
|
||||
|
||||
%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
|
||||
- rebase, several security issues fixed (rhbz#1348194)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user