commit:     baa568842f957a7062485f6fd733aae1e1361b4f
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 23 21:34:24 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Feb 23 22:14:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baa56884

dev-python/botocore: Use pytest-xdist to speed tests up

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/botocore/botocore-1.24.6.ebuild | 6 ++++--
 dev-python/botocore/botocore-9999.ebuild   | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/dev-python/botocore/botocore-1.24.6.ebuild 
b/dev-python/botocore/botocore-1.24.6.ebuild
index 79a1cd5da0e2..35239170e3a4 100644
--- a/dev-python/botocore/botocore-1.24.6.ebuild
+++ b/dev-python/botocore/botocore-1.24.6.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
+inherit distutils-r1 multiprocessing
 
 DESCRIPTION="Low-level, data-driven core of boto 3"
 HOMEPAGE="https://github.com/boto/botocore";
@@ -29,6 +29,7 @@ RDEPEND="
 BDEPEND="
        test? (
                dev-python/jsonschema[${PYTHON_USEDEP}]
+               dev-python/pytest-xdist[${PYTHON_USEDEP}]
        )
 "
 
@@ -61,5 +62,6 @@ python_test() {
                tests/functional/test_six_threading.py::test_six_thread_safety
        )
 
-       epytest tests/{functional,unit}
+       epytest tests/{functional,unit} \
+               -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
 }

diff --git a/dev-python/botocore/botocore-9999.ebuild 
b/dev-python/botocore/botocore-9999.ebuild
index 79a1cd5da0e2..35239170e3a4 100644
--- a/dev-python/botocore/botocore-9999.ebuild
+++ b/dev-python/botocore/botocore-9999.ebuild
@@ -5,7 +5,7 @@ EAPI=8
 
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{8..10} )
-inherit distutils-r1
+inherit distutils-r1 multiprocessing
 
 DESCRIPTION="Low-level, data-driven core of boto 3"
 HOMEPAGE="https://github.com/boto/botocore";
@@ -29,6 +29,7 @@ RDEPEND="
 BDEPEND="
        test? (
                dev-python/jsonschema[${PYTHON_USEDEP}]
+               dev-python/pytest-xdist[${PYTHON_USEDEP}]
        )
 "
 
@@ -61,5 +62,6 @@ python_test() {
                tests/functional/test_six_threading.py::test_six_thread_safety
        )
 
-       epytest tests/{functional,unit}
+       epytest tests/{functional,unit} \
+               -n "$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")"
 }

Reply via email to