[packages/ruby-redis] configure redis-cleanup on exit
glen
glen at pld-linux.org
Thu Jun 16 20:09:41 CEST 2016
commit 5399054f8e056e148f4118e210988422c53a19eb
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Thu Jun 16 21:05:03 2016 +0300
configure redis-cleanup on exit
ruby-redis.spec | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/ruby-redis.spec b/ruby-redis.spec
index f0c45ed..4259dd7 100644
--- a/ruby-redis.spec
+++ b/ruby-redis.spec
@@ -54,14 +54,16 @@ cp -p %{SOURCE1} test/test.conf
%if %{with tests}
port=6381
-sed -e "/^PORT/ s/6381/$port/" test/helper.rb
-sed -e "/^port/ s/6381/$port/" test/test.conf
+sed -i -e "/^PORT/ s/6381/$port/" test/helper.rb
+sed -i -e "/^port/ s/6381/$port/" test/test.conf
## Start a testing redis server instance
/usr/sbin/redis-server test/test.conf
sleep 1
cat test/db/stdout
kill -0 `cat test/db/redis.pid`
+## configure kill for redis-server
+trap 'kill -INT `cat test/db/redis.pid`' EXIT QUIT INT
## Set locale because two tests fail in mock.
## https://github.com/redis/redis-rb/issues/345
@@ -70,9 +72,6 @@ export LC_ALL=en_US.UTF-8
## Problems continue to surface with Minitest 5, so I've asked upstream how
## they want to proceed. https://github.com/redis/redis-rb/issues/487
ruby -Ilib -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
-
-## Kill redis-server
-kill -INT `cat test/db/redis.pid`
%endif
%install
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-redis.git/commitdiff/a22d3d0f8b6193deddb89517579fa75d021d3d04
More information about the pld-cvs-commit
mailing list