diff options
author | Remi Collet <fedora@famillecollet.com> | 2016-11-24 16:51:06 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2016-11-24 16:51:06 +0100 |
commit | 1509c5312d820ff8ba9d87ea5a0825969d8b3cd5 (patch) | |
tree | 459cdd2a63f742800f8618f6f9bd926e4e617f95 /phan.spec | |
parent | e20bd7365fe784bd06b21bd4f19bca6dda8b9ac9 (diff) |
phan: minor changes
Diffstat (limited to 'phan.spec')
-rw-r--r-- | phan.spec | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -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 |