[packages/php-pecl-mysql] Update tests to add xfail support

glen glen at pld-linux.org
Thu Nov 26 10:38:15 CET 2020


commit 5d9b9fd6799576b65b6fa12feda61299871e8382
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Nov 26 11:36:34 2020 +0200

    Update tests to add xfail support

 php-pecl-mysql.spec | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/php-pecl-mysql.spec b/php-pecl-mysql.spec
index 7006e40..647c16e 100644
--- a/php-pecl-mysql.spec
+++ b/php-pecl-mysql.spec
@@ -51,6 +51,32 @@ historical reasons only.
 mv pecl-database-%{modname}-*/* .
 %patch0 -p1
 
+cat <<'EOF' > run-tests.sh
+#!/bin/sh
+export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+exec %{__make} test \
+	PHP_EXECUTABLE=%{__php} \
+	PHP_TEST_SHARED_SYSTEM_EXTENSIONS="%{?with_mysqlnd:mysqlnd}" \
+	RUN_TESTS_SETTINGS="-q $*"
+EOF
+chmod +x run-tests.sh
+
+xfail() {
+	local t=$1
+	test -f $t
+	cat >> $t <<-EOF
+
+	--XFAIL--
+	Skip
+	EOF
+}
+
+while read line; do
+	t=${line##*\[}; t=${t%\]}
+	xfail $t
+done << 'EOF'
+EOF
+
 %build
 phpize
 %configure \
@@ -71,10 +97,7 @@ phpize
 	-m > modules.log
 grep %{modname} modules.log
 
-export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
-%{__make} test \
-	PHP_EXECUTABLE=%{__php} \
-	PHP_TEST_SHARED_SYSTEM_EXTENSIONS="%{?with_mysqlnd:mysqlnd}" \
+./run-tests.sh --show-diff
 %endif
 
 %install
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-mysql.git/commitdiff/8b818a29258cf93b4b5f14082e214c8982e83c1f



More information about the pld-cvs-commit mailing list