dev-python/pbr: adding git dep and changeing test scructure slightly
authorMatthew Thode <prometheanfire@gentoo.org>
Tue, 22 Sep 2015 06:37:41 +0000 (01:37 -0500)
committerMatthew Thode <prometheanfire@gentoo.org>
Tue, 22 Sep 2015 06:37:41 +0000 (01:37 -0500)
Package-Manager: portage-2.2.20.1

dev-python/pbr/pbr-1.8.0.ebuild

index f42181a4e6b1e312d569ffc335f08f0a45f9b182..6311750ecc2e00a598a8e4dbab22680db11d24ba 100644 (file)
@@ -17,6 +17,7 @@ SLOT="0"
 KEYWORDS="~amd64 ~hppa ~mips ~ppc64 ~x86 ~amd64-linux ~x86-linux"
 IUSE="test"
 
+# git is needed for tests, see https://bugs.launchpad.net/pbr/+bug/1326682 and https://bugs.gentoo.org/show_bug.cgi?id=561038
 DEPEND="
        dev-python/setuptools[${PYTHON_USEDEP}]
        test? (
@@ -33,12 +34,10 @@ DEPEND="
                >=dev-python/testscenarios-0.4[${PYTHON_USEDEP}]
                >=dev-python/testtools-1.4.0[${PYTHON_USEDEP}]
                dev-python/virtualenv[${PYTHON_USEDEP}]
+               dev-vcs/git
        )"
 PDEPEND="dev-python/pip[${PYTHON_USEDEP}]"
 
-# Requ'd for testsuite
-DISTUTILS_IN_SOURCE_BUILD=1
-
 # This normally actually belongs here.
 python_prepare_all() {
        # This test passes when run within the source and doesn't represent a failure, but rather
@@ -59,6 +58,10 @@ python_prepare_all() {
 }
 
 python_test() {
-       # Note; Tests, that have been removed, pass once package is emerged.
-       esetup.py testr
+       distutils_install_for_testing
+
+       rm -rf .testrepository || die "couldn't remove '.testrepository' under ${EPTYHON}"
+
+       testr init || die "testr init failed under ${EPYTHON}"
+       testr run || die "testr run failed under ${EPYTHON}"
 }