diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-01-08 19:30:57 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-01-08 19:30:57 +0100 |
commit | e95421901441352995efd5db61d6e3317e213020 (patch) | |
tree | aecd74e72c4a4b9a72fd370173c02182e2115d33 /php-nrk-Predis.spec | |
parent | 0a822d2a1209d9318559165fa7fb1dc513a07b73 (diff) |
php-nrk-Predis: more cleanups
Diffstat (limited to 'php-nrk-Predis.spec')
-rw-r--r-- | php-nrk-Predis.spec | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/php-nrk-Predis.spec b/php-nrk-Predis.spec index 50ab74f..0f1820d 100644 --- a/php-nrk-Predis.spec +++ b/php-nrk-Predis.spec @@ -84,22 +84,25 @@ install -pm 644 %{name}.xml %{buildroot}%{pear_xmldir} %check %if %{with_tests} -# Launch redis server +: Launch redis server +pidfile=$PWD/run/redis/redis.pid mkdir -p {run,log,lib}/redis sed -e "s:/var:$PWD:" \ - -e "/daemonize/s/no/yes/" \ /etc/redis.conf >redis.conf -%{_sbindir}/redis-server ./redis.conf +%{_sbindir}/redis-server \ + ./redis.conf \ + --daemonize yes \ + --pidfile $pidfile -# Run the test Suite -ret=0 +: Run the installed test Suite against the installed library pushd %{buildroot}%{pear_testdir}/%{pear_name} +ret=0 phpunit --include-path=%{buildroot}%{pear_phpdir} || ret=1 popd -# Cleanup -if [ -f run/redis/redis.pid ]; then - kill $(cat run/redis/redis.pid) +: Cleanup +if [ -f $pidfile ]; then + kill $(cat $pidfile) fi exit $ret |