[DRE-commits] [ruby-sidekiq] 03/05: start redis server for tests
Praveen Arimbrathodiyil
praveen at moszumanska.debian.org
Thu May 22 18:05:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
praveen pushed a commit to branch master
in repository ruby-sidekiq.
commit dd36903330ca5abd64c55da82292437de1e5e69c
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date: Thu May 22 23:23:07 2014 +0530
start redis server for tests
---
debian/rules | 16 +++++++++++++++-
debian/start-redis-server.sh | 5 +++++
debian/stop-redis-server.sh | 5 +++++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/debian/rules b/debian/rules
index d81794d..5935f80 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,10 +6,24 @@
#
# 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
+ rm -rf coverage
+
+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-sidekiq.git
More information about the Pkg-ruby-extras-commits
mailing list