[DRE-commits] [ruby-redis-namespace] 04/08: run a redis server for tests
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Thu May 22 12:04:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository ruby-redis-namespace.
commit 944025d7391964b636bc7b120522d4b711977c1b
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Thu May 22 17:30:13 2014 +0530
run a redis server for tests
---
debian/rules | 15 ++++++++++++++-
debian/start-redis-server.sh | 5 +++++
debian/stop-redis-server.sh | 5 +++++
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/debian/rules b/debian/rules
index d81794d..490d294 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,10 +6,23 @@
#
# Uncomment to ignore some test failures (but the tests will run anyway).
# Valid values:
-#export DH_RUBY_IGNORE_TESTS=ruby2.1 require-rubygems
+#export DH_RUBY_IGNORE_TESTS=ruby2.0 ruby2.1 require-rubygems
#
# If you need to specify the .gemspec (eg there is more than one)
#export DH_RUBY_GEMSPEC=gem.gemspec
%:
dh $@ --buildsystem=ruby --with ruby
+
+override_dh_auto_clean:
+ dh_auto_clean -O--buildsystem=ruby
+ # kill redis server for tests, don't fail if not started
+ debian/stop-redis-server.sh || true
+
+override_dh_auto_install:
+ # start redis server for tests
+ debian/start-redis-server.sh
+ # auto install
+ dh_auto_install -O--buildsystem=ruby
+ # kill redis server used for tests
+ debian/stop-redis-server.sh
diff --git a/debian/start-redis-server.sh b/debian/start-redis-server.sh
new file mode 100755
index 0000000..9f95a6c
--- /dev/null
+++ b/debian/start-redis-server.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+redis-server --daemonize yes
diff --git a/debian/stop-redis-server.sh b/debian/stop-redis-server.sh
new file mode 100755
index 0000000..4174aee
--- /dev/null
+++ b/debian/stop-redis-server.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+set -e
+
+pkill redis-server
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-redis-namespace.git
More information about the Pkg-ruby-extras-commits
mailing list