dev-python/psutil-5.6.5: Fix tests if already installed
authorPatrick McLean <patrick.mclean@sony.com>
Fri, 22 Nov 2019 18:25:41 +0000 (10:25 -0800)
committerPatrick McLean <chutzpah@gentoo.org>
Fri, 22 Nov 2019 18:26:01 +0000 (10:26 -0800)
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.79, Repoman-2.3.18
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
dev-python/psutil/psutil-5.6.5.ebuild

index ee3896643a5771e43cb832bbf322e961753a1324..ef2b398012ecc50c4acfc03f636817b88ee8beed 100644 (file)
@@ -23,8 +23,6 @@ DEPEND="
        )
 "
 
-# Many tests fail, even on a regular tox run on a upstream clone
-#RESTRICT="test"
 RESTRICT="!test? ( test )"
 
 PATCHES=(
@@ -36,8 +34,9 @@ python_test() {
                ewarn "Not running tests on ${EPYTHON} since they are broken"
                return 0
        fi
+
        # since we are running in an environment a bit similar to CI,
        # let's skip the tests that are disable for CI
-       TRAVIS=1 APPVEYOR=1 ${PYTHON} psutil/tests/__main__.py || \
+       TRAVIS=1 APPVEYOR=1 PYTHONPATH="${BUILD_DIR}/lib" ${PYTHON} psutil/tests/__main__.py || \
                die "tests failed with ${EPYTHON}"
 }