commit:     173bb4015477ec628b948cef72540f66e4e8fe3b
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 30 21:09:20 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Oct 30 21:09:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=173bb401

dev-python/qiskit-terra: use xdist for tests

Huge speedup.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-python/qiskit-terra/qiskit-terra-0.22.0.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dev-python/qiskit-terra/qiskit-terra-0.22.0.ebuild 
b/dev-python/qiskit-terra/qiskit-terra-0.22.0.ebuild
index 21deb84ad942..7a0c507d8577 100644
--- a/dev-python/qiskit-terra/qiskit-terra-0.22.0.ebuild
+++ b/dev-python/qiskit-terra/qiskit-terra-0.22.0.ebuild
@@ -74,7 +74,7 @@ CRATES="
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( python3_{8..10} )
 
-inherit cargo distutils-r1
+inherit cargo distutils-r1 multiprocessing
 
 DESCRIPTION="Terra is the foundation on which Qiskit is built"
 HOMEPAGE="https://github.com/Qiskit/qiskit-terra";
@@ -115,6 +115,7 @@ BDEPEND="
                >=dev-python/ddt-1.4.4[${PYTHON_USEDEP}]
                >=dev-python/hypothesis-4.24.3[${PYTHON_USEDEP}]
                >=dev-python/networkx-2.2[${PYTHON_USEDEP}]
+               dev-python/pytest-xdist[${PYTHON_USEDEP}]
                dev-python/qiskit-aer[${PYTHON_USEDEP}]
                >=sci-libs/scikit-learn-0.20.0[${PYTHON_USEDEP}]
        )
@@ -135,7 +136,7 @@ python_test() {
        # Some small tests are failing which test optional features.
        # Why they fail is still under investigation.
        # transpiler_equivalence tests take too long time, they are also 
skipped.
-       epytest -k 'not (TestOptions and test_copy) and not 
TestUnitarySynthesisPlugin and not test_transpiler_equivalence and not 
(TestPauliSumOp and test_to_instruction)'
+       epytest -n "$(makeopts_jobs)" -k 'not (TestOptions and test_copy) and 
not TestUnitarySynthesisPlugin and not test_transpiler_equivalence and not 
(TestPauliSumOp and test_to_instruction)'
 
        mv qiskit.hidden qiskit || die
 }

Reply via email to