summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukasz Strzygowski <lucass@gentoo.org>2007-03-20 08:23:56 +0000
committerLukasz Strzygowski <lucass@gentoo.org>2007-03-20 08:23:56 +0000
commitaabdc7c8511159daf8074da8849c38073d13542d (patch)
treec693f8f6c91f5ea4569eb53cb09889e745117703 /dev-python/sqlalchemy
parentRevert back to manually copying .so until concurrentmodphp is sorted out (diff)
downloadgentoo-2-aabdc7c8511159daf8074da8849c38073d13542d.tar.gz
gentoo-2-aabdc7c8511159daf8074da8849c38073d13542d.tar.bz2
gentoo-2-aabdc7c8511159daf8074da8849c38073d13542d.zip
Fixed tests to die on failure. Excluded testorderby and testorderby_desc which cause failure with sqlite-3.3.12.
(Portage version: 2.1.2.2)
Diffstat (limited to 'dev-python/sqlalchemy')
-rw-r--r--dev-python/sqlalchemy/ChangeLog7
-rw-r--r--dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild31
2 files changed, 32 insertions, 6 deletions
diff --git a/dev-python/sqlalchemy/ChangeLog b/dev-python/sqlalchemy/ChangeLog
index 26b9204a75f0..ac4991101ee2 100644
--- a/dev-python/sqlalchemy/ChangeLog
+++ b/dev-python/sqlalchemy/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-python/sqlalchemy
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/ChangeLog,v 1.6 2007/02/25 10:54:11 lucass Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/ChangeLog,v 1.7 2007/03/20 08:23:56 lucass Exp $
+
+ 20 Mar 2007; Lukasz Strzygowski <lucass@gentoo.org>
+ sqlalchemy-0.3.5.ebuild:
+ Fixed tests to die on failure. Excluded testorderby and testorderby_desc
+ which cause failure with sqlite-3.3.12.
*sqlalchemy-0.3.5 (25 Feb 2007)
diff --git a/dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild b/dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild
index bbcf1cbb8cb6..b8ba81ccc29d 100644
--- a/dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild
+++ b/dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild
@@ -1,6 +1,8 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild,v 1.1 2007/02/25 10:54:11 lucass Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-python/sqlalchemy/sqlalchemy-0.3.5.ebuild,v 1.2 2007/03/20 08:23:56 lucass Exp $
+
+NEED_PYTHON=2.4
inherit distutils
@@ -16,8 +18,7 @@ IUSE="doc examples firebird mssql mysql postgres sqlite test"
KEYWORDS="~amd64 ~x86"
# note: if you use psycopg-1, then you need egenix-mx-base
-RDEPEND=">=dev-lang/python-2.4
- firebird? ( dev-python/kinterbasdb )
+RDEPEND="firebird? ( dev-python/kinterbasdb )
mssql? ( dev-python/pymssql )
mysql? ( dev-python/mysql-python )
postgres? (
@@ -33,6 +34,27 @@ DEPEND="dev-python/setuptools
S="${WORKDIR}/${MY_P}"
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # skip testorderby and testorderby_desc
+ # which require sqlite-3.3.13 to pass
+ sed -i \
+ -e '1048,1060d' \
+ -e '1142,1155d' \
+ test/orm/mapper.py || die "sed failed"
+
+ sed -i -e 's/sleep(3)/sleep(5)/' \
+ test/engine/pool.py || die "sed failed"
+
+ # fix alltests.py to return 1 on failure
+ sed -i \
+ -e '1iimport sys' \
+ -e 's/\(testbase\.run.*\)/sys.exit(not \1.wasSuccessful())/' \
+ test/alltests.py || die "sed failed"
+}
+
src_install() {
distutils_src_install
@@ -45,6 +67,5 @@ src_install() {
}
src_test() {
- sed -e 's/sleep(3)/sleep(5)/' -i test/engine/pool.py
- PYTHONPATH="./test/" "${python}" test/alltests.py
+ PYTHONPATH="./test/" "${python}" test/alltests.py || die "tests failed"
}