summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-05-14 14:48:38 +0200
committerMichał Górny <mgorny@gentoo.org>2024-05-20 18:56:44 +0200
commitbe50ed0537e06560614cedc379c60292300a7e3e (patch)
tree95478752224667f2128a05aaef22f90b35dba38a /eclass
parentdistutils-r1.eclass: Support reusing prior wheels when compatible (diff)
downloadgentoo-be50ed0537e06560614cedc379c60292300a7e3e.tar.gz
gentoo-be50ed0537e06560614cedc379c60292300a7e3e.tar.bz2
gentoo-be50ed0537e06560614cedc379c60292300a7e3e.zip
python-utils-r1.eclass: Support passing EPYTEST_FLAGS
Closes: https://bugs.gentoo.org/905863 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/python-utils-r1.eclass11
1 files changed, 10 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 275ac3a96523..584ed831f816 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1321,6 +1321,15 @@ _python_check_occluded_packages() {
# Specifies the number of jobs for parallel (pytest-xdist) test runs.
# When unset, defaults to -j from MAKEOPTS, or the current nproc.
+# @ECLASS_VARIABLE: EPYTEST_FLAGS
+# @USER_VARIABLE
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Additional flags to pass to pytest. This is intended to be set
+# in the environment when debugging packages (options such as -x or -s
+# are useful here), rather than globally. It must not be set
+# in ebuilds.
+
# @FUNCTION: epytest
# @USAGE: [<args>...]
# @DESCRIPTION:
@@ -1432,7 +1441,7 @@ epytest() {
for x in "${EPYTEST_IGNORE[@]}"; do
args+=( --ignore "${x}" )
done
- set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}"
+ set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}" ${EPYTEST_FLAGS}
echo "${@}" >&2
"${@}" || die -n "pytest failed with ${EPYTHON}"