diff options
author | Remi Collet <remi@remirepo.net> | 2020-08-31 07:32:11 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-08-31 07:32:11 +0200 |
commit | 594c151ee6df2c6618d43032c3d33383724857bf (patch) | |
tree | c6c1394186d2b7f8e5b4a9728f6cb95031327f22 | |
parent | 8152a17fa06088735fce77b089082360aaced55a (diff) |
improve test suite
-rw-r--r-- | php-nikic-php-parser4.spec | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/php-nikic-php-parser4.spec b/php-nikic-php-parser4.spec index 2c63f74..3820907 100644 --- a/php-nikic-php-parser4.spec +++ b/php-nikic-php-parser4.spec @@ -115,19 +115,24 @@ php bin/php-parse-test --help mkdir vendor cat << 'AUTOLOAD' | tee vendor/autoload.php <?php -require_once '%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('%{ns_project}\\', dirname(__DIR__).'/test/PhpParser/'); AUTOLOAD : Upstream test suite -# ignore test failing on 32-bit (in koji) +BITS=$(php -r 'echo PHP_INT_SIZE;') +if [ $BITS -lt 8 ]; then + # ignore test failing on 32-bit (in koji) + FILTER="--filter '^((?!(testParse|testLexNewFeatures)).)*$'" +else + FILTER="" +fi + ret=0 for cmdarg in "php %{phpunit}" "php72%{_bindir}/phpunit8" php73 php74 php80; do if which $cmdarg; then set $cmdarg - $1 ${2:-%{_bindir}/phpunit9} \ - --filter '^((?!(testParse|testLexNewFeatures)).)*$' \ - --verbose || ret=1 + $1 -d auto_prepend_file=%{buildroot}/%{php_home}/%{ns_project}%{major}/autoload.php \ + ${2:-%{_bindir}/phpunit9} $FILTER --verbose || ret=1 fi done exit $ret |