summaryrefslogtreecommitdiffstats
path: root/phan.spec
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-11-24 16:51:06 +0100
committerRemi Collet <fedora@famillecollet.com>2016-11-24 16:51:06 +0100
commit1509c5312d820ff8ba9d87ea5a0825969d8b3cd5 (patch)
tree459cdd2a63f742800f8618f6f9bd926e4e617f95 /phan.spec
parente20bd7365fe784bd06b21bd4f19bca6dda8b9ac9 (diff)
phan: minor changes
Diffstat (limited to 'phan.spec')
-rw-r--r--phan.spec19
1 files changed, 14 insertions, 5 deletions
diff --git a/phan.spec b/phan.spec
index 02ddbcb..15e3c55 100644
--- a/phan.spec
+++ b/phan.spec
@@ -86,7 +86,6 @@ and narrow types based on conditionals.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1
-
cp %{SOURCE1} src/%{psr0}/autoload.php
@@ -112,14 +111,24 @@ ln -s ../share/php/%{psr0}/prep.php %{buildroot}%{_bindir}/phan-prep
%check
%if %{with_tests}
-mkdir vendor
-cat << 'EOF' | tee vendor/autoload.php
+cat << 'EOF' | tee tests/autoload.php
<?php
require '%{buildroot}%{_datadir}/php/%{psr0}/Bootstrap.php';
-\Fedora\Autoloader\Autoload::addPsr4('Phan\\Tests\\', dirname(__DIR__).'/tests/Phan');
+\Fedora\Autoloader\Autoload::addPsr4('Phan\\Tests\\', __DIR__ . '/Phan');
EOF
-%{_bindir}/phpunit -d memory_limit=1G --bootstrap vendor/autoload.php --verbose
+# remirepo:6
+run=0
+ret=0
+if which php71; then
+ php71 %{_bindir}/phpunit -d memory_limit=1G --bootstrap tests/autoload.php || : ignore segfaults...
+ run=1
+fi
+%{_bindir}/phpunit -d memory_limit=1G --bootstrap tests/autoload.php --verbose
+# remirepo:1
+exit $ret
+
+
%else
: Test suite disabled
%endif