From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 377E71581D3 for ; Fri, 17 May 2024 07:04:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 82D54E2AC9; Fri, 17 May 2024 07:02:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 09CE3E2AC5 for ; Fri, 17 May 2024 07:02:42 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH v2 5/7] python-utils-r1.eclass: Support passing EPYTEST_FLAGS Date: Fri, 17 May 2024 09:00:28 +0200 Message-ID: <20240517070231.321230-6-mgorny@gentoo.org> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240517070231.321230-1-mgorny@gentoo.org> References: <20240517070231.321230-1-mgorny@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: d86e14f7-be58-4ec7-b59d-dda721d3a05f X-Archives-Hash: 65a3cecf77ad1aed19634c9cbf471307 Closes: https://bugs.gentoo.org/905863 Signed-off-by: Michał Górny --- eclass/python-utils-r1.eclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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: [...] # @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}" -- 2.45.1