dev-python/pygobject: Improve src_test
authorMichał Górny <mgorny@gentoo.org>
Thu, 19 Jul 2018 18:43:46 +0000 (20:43 +0200)
committerMichał Górny <mgorny@gentoo.org>
Thu, 19 Jul 2018 18:59:04 +0000 (20:59 +0200)
Spawn virtx once for all tests.  Use local variables.

dev-python/pygobject/pygobject-3.24.1.ebuild

index 0eae8c8d7504aec1e0592eb43cb2a75059bd6c69..1013f9e4392fc631b25d5db9b97f526ef303c58a 100644 (file)
@@ -90,17 +90,15 @@ src_compile() {
 }
 
 src_test() {
-       export GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
-       export GIO_USE_VOLUME_MONITOR="unix" # prevent udisks-related failures in chroots, bug #449484
-       export SKIP_PEP8="yes"
+       local -x GIO_USE_VFS="local" # prevents odd issues with deleting ${T}/.gvfs
+       local -x GIO_USE_VOLUME_MONITOR="unix" # prevent udisks-related failures in chroots, bug #449484
+       local -x SKIP_PEP8="yes"
 
        testing() {
-               export XDG_CACHE_HOME="${T}/${EPYTHON}"
-               run_in_build_dir virtx emake check
-               unset XDG_CACHE_HOME
+               local -x XDG_CACHE_HOME="${T}/${EPYTHON}"
+               emake -C "${BUILD_DIR}" check
        }
-       python_foreach_impl testing
-       unset GIO_USE_VFS
+       virtx python_foreach_impl testing
 }
 
 src_install() {