summaryrefslogtreecommitdiff
path: root/dev-ml
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-07-09 19:15:59 +0200
committerAlexis Ballier <aballier@gentoo.org>2017-07-09 19:16:17 +0200
commit9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d (patch)
treec39764a8c931e9dc3398597bbf4cb4d6b75543b1 /dev-ml
parentdev-ml/ocsigen-i18n: initial import; ebuild by me (diff)
downloadgentoo-9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d.tar.gz
gentoo-9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d.tar.bz2
gentoo-9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d.zip
dev-ml/ocaml-redis: start a local redis server in src_test, bug #623988
Package-Manager: Portage-2.3.6, Repoman-2.3.2
Diffstat (limited to 'dev-ml')
-rw-r--r--dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild11
1 files changed, 9 insertions, 2 deletions
diff --git a/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild b/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild
index bea5cf2ad61c..5133ae440d4e 100644
--- a/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild
+++ b/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild
@@ -22,14 +22,21 @@ RDEPEND="
DEPEND="${RDEPEND}
dev-ml/jbuilder
dev-ml/opam
- test? ( dev-ml/ounit )"
+ test? ( dev-ml/ounit dev-db/redis )"
src_compile() {
jbuilder build -p redis || die
}
src_test() {
- jbuilder runtest || die
+ einfo "Starting test redis server"
+ local port=4567
+ /usr/sbin/redis-server --port ${port} &
+ local rpid=$!
+ export OCAML_REDIS_TEST_PORT=${port}
+ sleep 1
+ jbuilder runtest || { kill ${rpid}; die; }
+ kill ${rpid} || die
}
src_install() {