[packages/php/PHP_5_4] update testing to work again

glen glen at pld-linux.org
Mon Aug 27 02:13:42 CEST 2012


commit 482166f6dae7840c517b49f491ce0b4bea22c274
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Aug 27 03:13:15 2012 +0300

    update testing to work again

 php.spec | 30 +++++++++++++++++++++---------
 1 file changed, 21 insertions(+), 9 deletions(-)
---
diff --git a/php.spec b/php.spec
index ea1bea0..709dd29 100644
--- a/php.spec
+++ b/php.spec
@@ -1987,7 +1987,20 @@ mv Zend/tests/bug39438.phpt{,.disable}
 # probably pointless.
 %{__rm} ext/standard/tests/file/disk_free_space_basic.phpt
 
-#sh -xe %{_sourcedir}/skip-tests.sh
+%ifarch %{x8664}
+# all pdo_sqlite, sqlite3 tests die with Aborted on carme
+%{__rm} -r ext/pdo_sqlite/tests
+%{__rm} -r ext/sqlite3/tests
+%endif
+
+env \
+%ifarch %{ix86}
+ix86= x8664=:
+%endif
+%ifarch %{x8664}
+ix86=: x8664= \
+%endif
+	sh -xe %{_sourcedir}/skip-tests.sh
 
 %build
 API=$(awk '/#define PHP_API_VERSION/{print $3}' main/php.h)
@@ -2282,7 +2295,6 @@ cp -pf php_config.h.cgi-fcgi main/php_config.h
 %if %{with fpm}
 cp -pf php_config.h.fpm main/php_config.h
 %{__make} -f Makefile.fpm
-./sapi/fpm/php-fpm -n -m
 [ $(./sapi/fpm/php-fpm -n -m | grep cgi-fcgi) = "cgi-fcgi" ]
 %endif
 
@@ -2352,17 +2364,17 @@ chmod +x run-tests.sh
 cp -pf php_config.h.cli main/php_config.h
 cp -pf Makefile.cli Makefile
 
-./run-tests.sh -w failed.log -s test.log
+./run-tests.sh -w failed.log -s tests.log
 
 # collect failed tests into cleanup script used in prep.
-sed -ne '/FAILED TEST SUMMARY/,/^===/p' test.log | sed -e '1,/^---/d;/^===/,$d' > tests-failed.log
-sed -ne '/\[.*\]/{s/\(.*\) \[\(.*\)\]/# \1\nmv \2{,.skip}/p}' tests-failed.log \
+sed -ne '/^FAILED TEST SUMMARY/,/^===/p' tests.log | sed -e '1,/^---/d;/^===/,$d' > tests-failed.log
+sed -ne '/^via/d;/\[.*\]/{s/\t*\(.*\) \[\(.*\)\]\(.*\)/# \1\3\nmv \2{,.skip}/p}' tests-failed.log \
 	>> %{_sourcedir}/skip-tests.sh
 
-failed=$(wc -l < tests-failed.log)
-if [ "$failed" != 0 ]; then
-	exit 1
-fi
+test ! -s failed.log
+
+# if on builders, dump test log
+tty -q || cat tests.log
 %endif
 
 %install


More information about the pld-cvs-commit mailing list