public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-db/redis: ChangeLog redis-1.2.5.ebuild
@ 2010-05-02 22:30 Robin H. Johnson (robbat2)
  0 siblings, 0 replies; 2+ messages in thread
From: Robin H. Johnson (robbat2) @ 2010-05-02 22:30 UTC (permalink / raw
  To: gentoo-commits

robbat2     10/05/02 22:30:19

  Modified:             ChangeLog redis-1.2.5.ebuild
  Log:
  Bug #316767: implement a full src_test that does server setup first.
  (Portage version: 2.2_rc67/cvs/Linux x86_64)

Revision  Changes    Path
1.4                  dev-db/redis/ChangeLog

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/redis/ChangeLog?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/redis/ChangeLog?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/redis/ChangeLog?r1=1.3&r2=1.4

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v
retrieving revision 1.3
retrieving revision 1.4
diff -p -w -b -B -u -u -r1.3 -r1.4
--- ChangeLog	25 Mar 2010 19:01:03 -0000	1.3
+++ ChangeLog	2 May 2010 22:30:19 -0000	1.4
@@ -1,6 +1,9 @@
 # ChangeLog for dev-db/redis
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.3 2010/03/25 19:01:03 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.4 2010/05/02 22:30:19 robbat2 Exp $
+
+  02 May 2010; Robin H. Johnson <robbat2@gentoo.org> redis-1.2.5.ebuild:
+  Bug #316767: implement a full src_test that does server setup first.
 
   25 Mar 2010; Robin H. Johnson <robbat2@gentoo.org> metadata.xml:
   Add lu_zero as another maintainer.



1.3                  dev-db/redis/redis-1.2.5.ebuild

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild?r1=1.2&r2=1.3

Index: redis-1.2.5.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild,v
retrieving revision 1.2
retrieving revision 1.3
diff -p -w -b -B -u -u -r1.2 -r1.3
--- redis-1.2.5.ebuild	25 Mar 2010 07:36:36 -0000	1.2
+++ redis-1.2.5.ebuild	2 May 2010 22:30:19 -0000	1.3
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild,v 1.2 2010/03/25 07:36:36 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/redis-1.2.5.ebuild,v 1.3 2010/05/02 22:30:19 robbat2 Exp $
 
 EAPI=2
 
@@ -12,11 +12,11 @@ SRC_URI="http://redis.googlecode.com/fil
 
 LICENSE="BSD"
 KEYWORDS="~amd64 ~x86"
-IUSE=""
+IUSE="test"
 SLOT="0"
 
 RDEPEND=""
-DEPEND=""
+DEPEND="test? ( dev-lang/tcl )"
 
 REDIS_PIDDIR=/var/run/redis/
 REDIS_PIDFILE=${REDIS_PIDDIR}/redis.pid
@@ -79,3 +79,41 @@ src_install() {
 	diropts -m0750 -o redis -g redis
 	keepdir ${REDIS_DATAPATH} ${REDIS_LOGFILE} ${REDIS_PIDDIR}
 }
+
+src_test() {
+	local PORT=$(((RANDOM % 32767)+32768))
+	local PIDFILE=redis-test.pid
+	einfo "Preparing redis test config"
+	# The port number is hardcoded in lots of places
+	sed -r <redis.conf >redis-test.conf \
+		-e "/^pidfile/s~ .*~ ${PIDFILE}~" \
+		-e '/^daemonize/s~ no~ yes~' \
+		-e "/^port/s~ [0-9]+~ ${PORT}~" \
+		-e '/^(# )?bind/s,^,#,g' \
+		-e '/\<bind\>/abind 127.0.0.1' \
+		|| die "Failed to build test server config"
+	# The port number is hardcoded in lots of places
+	for i in test-redis.tcl redis.tcl ; do
+		sed -r <$i >${i/.tcl/-${PORT}.tcl} \
+			-e "/^source redis.tcl/s,redis.tcl,redis-${PORT}.tcl,g" \
+			-e "/6379/s~6379~${PORT}~" \
+			|| die "Failed to build test client config ($i)"
+	done
+	einfo "Starting test server"
+	./redis-server redis-test.conf
+	rc1=$?
+	sleep 2
+	[[ $rc1 -ne 0 ]] && die "Failed to start redis server!"
+	pidof redis-server | fgrep -f ${PIDFILE}
+	rc1=$?
+	[[ $rc1 -ne 0 ]] && die "Could not find started redis server!"
+	unset rc1
+
+	einfo "Starting redis tests"
+	tclsh test-redis-$PORT.tcl
+	rc1=$?
+	kill -9 $(<${PIDFILE})
+	rc2=$?
+	[[ $rc1 -ne 0 ]] && die "Failed testsuite"
+	[[ $rc2 -ne 0 ]] && die "Failed to shut down redis server"
+}






^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in dev-db/redis: ChangeLog redis-1.2.5.ebuild
@ 2011-04-04  9:31 Dirkjan Ochtman (djc)
  0 siblings, 0 replies; 2+ messages in thread
From: Dirkjan Ochtman (djc) @ 2011-04-04  9:31 UTC (permalink / raw
  To: gentoo-commits

djc         11/04/04 09:31:24

  Modified:             ChangeLog
  Removed:              redis-1.2.5.ebuild
  Log:
  Remove old version.
  
  (Portage version: 2.1.9.45/cvs/Linux x86_64)

Revision  Changes    Path
1.10                 dev-db/redis/ChangeLog

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/redis/ChangeLog?r1=1.9&r2=1.10

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ChangeLog	4 Apr 2011 09:28:26 -0000	1.9
+++ ChangeLog	4 Apr 2011 09:31:24 -0000	1.10
@@ -1,6 +1,9 @@
 # ChangeLog for dev-db/redis
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.9 2011/04/04 09:28:26 djc Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/redis/ChangeLog,v 1.10 2011/04/04 09:31:24 djc Exp $
+
+  04 Apr 2011; Dirkjan Ochtman <djc@gentoo.org> -redis-1.2.5.ebuild:
+  Remove old version.
 
   04 Apr 2011; Dirkjan Ochtman <djc@gentoo.org> metadata.xml:
   Add myself as a maintainer.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-04  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04  9:31 [gentoo-commits] gentoo-x86 commit in dev-db/redis: ChangeLog redis-1.2.5.ebuild Dirkjan Ochtman (djc)
  -- strict thread matches above, loose matches on Subject: below --
2010-05-02 22:30 Robin H. Johnson (robbat2)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox