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 619A1158013 for ; Sat, 2 Dec 2023 12:44:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CE0E82BC028; Sat, 2 Dec 2023 12:44:48 +0000 (UTC) Received: from smtp.gentoo.org (mail.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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8BD3E2BC013 for ; Sat, 2 Dec 2023 12:44:48 +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] python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLOR Date: Sat, 2 Dec 2023 13:44:43 +0100 Message-ID: <20231202124443.244613-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.43.0 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: b64e1051-1d5d-4c2e-8795-9d34bce1d8da X-Archives-Hash: c87279b3e51a91129640b600a38602c4 Update epytest to respect the modern NO_COLOR variable rather than Portage's old NOCOLOR. Adjust it to correctly check whether it is set at all rather than to a specific value, to match the behavior of pytest itself. Signed-off-by: Michał Górny --- eclass/python-utils-r1.eclass | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 394f64a5d139..da9cb820840f 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1336,15 +1336,8 @@ epytest() { _python_check_EPYTHON _python_check_occluded_packages - local color - case ${NOCOLOR} in - true|yes) - color=no - ;; - *) - color=yes - ;; - esac + local color=yes + [[ ${NO_COLOR} ]] && color=no local args=( # verbose progress reporting and tracebacks -- 2.43.0