[libarchive] spec: try to work around racy testsuite on ppc
Pavel Raiskup
praiskup at fedoraproject.org
Mon Jul 22 12:17:32 UTC 2013
commit bbde57d99fffaf30453dced17bb4c2e458a2517e
Author: Pavel Raiskup <praiskup at redhat.com>
Date: Mon Jul 22 14:16:42 2013 +0200
spec: try to work around racy testsuite on ppc
Version: 3.1.2-5
libarchive.spec | 46 ++++++++++++++++++++++++++++++++--------------
1 files changed, 32 insertions(+), 14 deletions(-)
---
diff --git a/libarchive.spec b/libarchive.spec
index f660d5c..db50724 100644
--- a/libarchive.spec
+++ b/libarchive.spec
@@ -1,6 +1,6 @@
Name: libarchive
Version: 3.1.2
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: A library for handling streaming archive formats
Group: System Environment/Libraries
@@ -92,19 +92,34 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
%check
-LD_LIBRARY_PATH=`pwd`/.libs make 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
- find $i -printf "%p\n ~> %c\n ~> %s B\n"
- echo "-------------------------"
- cat $i/*.log
- done
- false # stop here
-)
-
+run_testsuite()
+{
+ LD_LIBRARY_PATH=`pwd`/.libs make check -j1
+ res=$?
+ echo $res
+ if [ $res -ne 0 ]; then
+ # 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
+ find $i -printf "%p\n ~> a: %a\n ~> c: %c\n ~> t: %t\n ~> %s B\n"
+ echo "-------------------------"
+ cat $i/*.log
+ done
+ return 1
+ else
+ return 0
+ fi
+}
+
+run_testsuite
+%ifarch ppc
+ # On a ppc/ppc64 is some race condition causing 'make check' fail on ppc
+ # when both 32 and 64 builds are done in parallel on the same machine in
+ # koji. Try to run once again if failed.
+ test $? -ne 0 && run_testsuite
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -147,6 +162,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Mon Jul 22 2013 Pavel Raiskup <praiskup at redhat.com> - 3.1.2-5
+- try to workaround racy testsuite fail
+
* Sun Jun 30 2013 Pavel Raiskup <praiskup at redhat.com> - 3.1.2-4
- enable testsuite in the %%check phase
More information about the scm-commits
mailing list