diff options
author | Alexis Ballier <aballier@gentoo.org> | 2017-07-09 19:15:59 +0200 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2017-07-09 19:16:17 +0200 |
commit | 9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d (patch) | |
tree | c39764a8c931e9dc3398597bbf4cb4d6b75543b1 /dev-ml/ocaml-redis | |
parent | dev-ml/ocsigen-i18n: initial import; ebuild by me (diff) | |
download | gentoo-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/ocaml-redis')
-rw-r--r-- | dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild | 11 |
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() { |