diff options
author | 2024-05-17 15:09:44 +0200 | |
---|---|---|
committer | 2024-05-20 18:56:46 +0200 | |
commit | d5e060a2d9ae439620689acc720d9a11a859a3a1 (patch) | |
tree | ad198dc6573f82d8b73c855f0ef7f13346947592 /eclass | |
parent | distutils-r1.eclass: Pass ninja options to scikit-build-core (diff) | |
download | gentoo-d5e060a2d9ae439620689acc720d9a11a859a3a1.tar.gz gentoo-d5e060a2d9ae439620689acc720d9a11a859a3a1.tar.bz2 gentoo-d5e060a2d9ae439620689acc720d9a11a859a3a1.zip |
python-utils-r1.eclass: Fix cleanup in failing epytest
Fix epytest to call `die -n` after performing the cleanup, rather than
before. This ensures that stray cache files are cleaned up even if
we're actually going to die, e.g. when using
`FEATURES=test-fail-continue`.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36672
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 584ed831f816..c47565fa1db2 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1444,7 +1444,7 @@ epytest() { set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}" ${EPYTEST_FLAGS} echo "${@}" >&2 - "${@}" || die -n "pytest failed with ${EPYTHON}" + "${@}" local ret=${?} # remove common temporary directories left over by pytest plugins @@ -1455,6 +1455,7 @@ epytest() { find "${BUILD_DIR}" -name '*-pytest-*.pyc' -delete || die fi + [[ ${ret} -ne 0 ]] && die -n "pytest failed with ${EPYTHON}" return ${ret} } |