[DRE-commits] [ruby-redis] 03/05: start a redis instance to run tests

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Thu Apr 24 05:24:05 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.

commit bb7367e8664b624416ddddb352b9264aab8120fd
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Thu Apr 24 10:01:32 2014 +0530

    start a redis instance to run tests
---
 debian/rules                           |  9 +++++++++
 debian/start_redis_and_auto_install.sh | 27 +++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/debian/rules b/debian/rules
index 06981cd..cf3a38a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,3 +13,12 @@
 
 %:
 	dh $@ --buildsystem=ruby --with ruby
+
+# need to start a redis instance to run the tests
+override_dh_auto_install:
+	chmod +x debian/start_redis_and_auto_install.sh
+	debian/start_redis_and_auto_install.sh
+
+clean:
+	dh clean
+	rm -rf test/db/stdout
diff --git a/debian/start_redis_and_auto_install.sh b/debian/start_redis_and_auto_install.sh
new file mode 100755
index 0000000..d076e24
--- /dev/null
+++ b/debian/start_redis_and_auto_install.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# start_mysqld_and_auto_install.sh - starts an instance of mysqld before
+# auto_installing and running do_mysql's test suite. It is inspired by
+# debian/test_mysql.sh from libdbi-drivers source package.
+
+
+
+set -e
+
+MYTEMP_DIR=`mktemp -d`
+ME=`whoami`
+
+export MYSQL_UNIX_PORT=${MYTEMP_DIR}/mysql.sock
+DO_MYSQL_USER=root
+DO_MYSQL_PASS=
+DO_MYSQL_DBNAME=test
+DO_MYSQL_DATABASE=/${DO_MYSQL_DBNAME}
+
+redis-server test/test.conf
+
+dh_auto_install
+
+kill -9 `cat test/db/redis.pid`
+rm -rf test/db/redis.sock test/db/redis.pid test/db/stdout
+
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-redis.git



More information about the Pkg-ruby-extras-commits mailing list