summaryrefslogtreecommitdiffstats
path: root/php-nikic-php-parser4.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-nikic-php-parser4.spec')
-rw-r--r--php-nikic-php-parser4.spec15
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