diff options
author | Elan Ruusamäe | 2020-11-26 09:36:34 (GMT) |
---|---|---|
committer | Elan Ruusamäe | 2020-11-26 09:36:34 (GMT) |
commit | 5d9b9fd6799576b65b6fa12feda61299871e8382 (patch) | |
tree | 3a8a7727eb197bb69a98f1db1efbce08d9a18008 | |
parent | 3c6d6e5f85721d5fe65cbd159a0a7958ca7c16cf (diff) | |
download | php-pecl-mysql-5d9b9fd6799576b65b6fa12feda61299871e8382.zip php-pecl-mysql-5d9b9fd6799576b65b6fa12feda61299871e8382.tar.gz |
Update tests to add xfail support
-rw-r--r-- | php-pecl-mysql.spec | 31 |
1 files 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 |