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 A49C415823F for ; Sun, 19 Nov 2023 16:01:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E7A342BC041; Sun, 19 Nov 2023 16:01:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 CEA292BC041 for ; Sun, 19 Nov 2023 16:01:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 smtp.gentoo.org (Postfix) with ESMTPS id 22409335CEE for ; Sun, 19 Nov 2023 16:01:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0FC2A13A7 for ; Sun, 19 Nov 2023 16:01:22 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1700409674.171a72e48ca08dd7d5f1a0f9c00d5a3297db1239.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/python-utils-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 171a72e48ca08dd7d5f1a0f9c00d5a3297db1239 X-VCS-Branch: master Date: Sun, 19 Nov 2023 16:01:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f45265c6-de76-48c7-9c29-f773c5f450a0 X-Archives-Hash: 40e0d13e084fa6a1c9ca40a83720677c commit: 171a72e48ca08dd7d5f1a0f9c00d5a3297db1239 Author: Michał Górny gentoo org> AuthorDate: Sat Nov 18 15:55:11 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Sun Nov 19 16:01:14 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=171a72e4 python-utils-r1.eclass: Do not pass `-p no:*` w/ no autoloading Modify `epytest` not to pass our plethora of `-p no:*` arguments when `PYTEST_DISABLE_PLUGIN_AUTOLOAD` is set. This is NFC since the plugins wouldn't be loaded anyway. Signed-off-by: Michał Górny gentoo.org> eclass/python-utils-r1.eclass | 51 ++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 1de4f325de33..394f64a5d139 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1362,31 +1362,36 @@ epytest() { # count is more precise when we're dealing with a large number # of tests -o console_output_style=count - # disable the undesirable-dependency plugins by default to - # trigger missing argument strips. strip options that require - # them from config files. enable them explicitly via "-p ..." - # if you *really* need them. - -p no:cov - -p no:flake8 - -p no:flakes - -p no:pylint - # sterilize pytest-markdown as it runs code snippets from all - # *.md files found without any warning - -p no:markdown - # pytest-sugar undoes everything that's good about pytest output - # and makes it hard to read logs - -p no:sugar - # pytest-xvfb automatically spawns Xvfb for every test suite, - # effectively forcing it even when we'd prefer the tests - # not to have DISPLAY at all, causing crashes sometimes - # and causing us to miss missing virtualx usage - -p no:xvfb - # intrusive packages that break random test suites - -p no:pytest-describe - -p no:plus - -p no:tavern ) + if [[ ! ${PYTEST_DISABLE_PLUGIN_AUTOLOAD} ]]; then + args+=( + # disable the undesirable-dependency plugins by default to + # trigger missing argument strips. strip options that require + # them from config files. enable them explicitly via "-p ..." + # if you *really* need them. + -p no:cov + -p no:flake8 + -p no:flakes + -p no:pylint + # sterilize pytest-markdown as it runs code snippets from all + # *.md files found without any warning + -p no:markdown + # pytest-sugar undoes everything that's good about pytest output + # and makes it hard to read logs + -p no:sugar + # pytest-xvfb automatically spawns Xvfb for every test suite, + # effectively forcing it even when we'd prefer the tests + # not to have DISPLAY at all, causing crashes sometimes + # and causing us to miss missing virtualx usage + -p no:xvfb + # intrusive packages that break random test suites + -p no:pytest-describe + -p no:plus + -p no:tavern + ) + fi + if [[ ${EPYTEST_XDIST} ]]; then local jobs=${EPYTEST_JOBS:-$(makeopts_jobs)} if [[ ${jobs} -gt 1 ]]; then