Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ml/ocaml-redis/
Date: Sun, 09 Jul 2017 17:16:26
Message-Id: 1499620577.9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d.aballier@gentoo
1 commit: 9cd6d2df99288cb6cb385c4bbcaf9ebf82f71c7d
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 9 17:15:59 2017 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 9 17:16:17 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9cd6d2df
7
8 dev-ml/ocaml-redis: start a local redis server in src_test, bug #623988
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.2
11
12 dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild | 11 +++++++++--
13 1 file changed, 9 insertions(+), 2 deletions(-)
14
15 diff --git a/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild b/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild
16 index bea5cf2ad61..5133ae440d4 100644
17 --- a/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild
18 +++ b/dev-ml/ocaml-redis/ocaml-redis-0.3.5.ebuild
19 @@ -22,14 +22,21 @@ RDEPEND="
20 DEPEND="${RDEPEND}
21 dev-ml/jbuilder
22 dev-ml/opam
23 - test? ( dev-ml/ounit )"
24 + test? ( dev-ml/ounit dev-db/redis )"
25
26 src_compile() {
27 jbuilder build -p redis || die
28 }
29
30 src_test() {
31 - jbuilder runtest || die
32 + einfo "Starting test redis server"
33 + local port=4567
34 + /usr/sbin/redis-server --port ${port} &
35 + local rpid=$!
36 + export OCAML_REDIS_TEST_PORT=${port}
37 + sleep 1
38 + jbuilder runtest || { kill ${rpid}; die; }
39 + kill ${rpid} || die
40 }
41
42 src_install() {