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 1B00A15808B for ; Thu, 24 Feb 2022 11:01:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 25705E081E; Thu, 24 Feb 2022 11:01:10 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F013AE081E for ; Thu, 24 Feb 2022 11:01:09 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84261342C85 for ; Thu, 24 Feb 2022 11:01:08 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BBA3B2EC for ; Thu, 24 Feb 2022 11:01:06 +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: <1645700463.32ad24c1352a0fc841fce9f2a5d30fee375386cf.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pytest-console-scripts/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pytest-console-scripts/pytest-console-scripts-1.3.ebuild X-VCS-Directories: dev-python/pytest-console-scripts/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 32ad24c1352a0fc841fce9f2a5d30fee375386cf X-VCS-Branch: master Date: Thu, 24 Feb 2022 11:01:06 +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: 401ab1dc-3098-424e-b1dd-248b1929ac92 X-Archives-Hash: d9a3953f39f8a3b11f9c60312d05f93c commit: 32ad24c1352a0fc841fce9f2a5d30fee375386cf Author: Michał Górny gentoo org> AuthorDate: Thu Feb 24 11:00:06 2022 +0000 Commit: Michał Górny gentoo org> CommitDate: Thu Feb 24 11:01:03 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32ad24c1 dev-python/pytest-console-scripts: Fix tests on first install Closes: https://bugs.gentoo.org/833969 Signed-off-by: Michał Górny gentoo.org> .../pytest-console-scripts-1.3.ebuild | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dev-python/pytest-console-scripts/pytest-console-scripts-1.3.ebuild b/dev-python/pytest-console-scripts/pytest-console-scripts-1.3.ebuild index ecebac91b445..c63120a98ecc 100644 --- a/dev-python/pytest-console-scripts/pytest-console-scripts-1.3.ebuild +++ b/dev-python/pytest-console-scripts/pytest-console-scripts-1.3.ebuild @@ -25,3 +25,16 @@ BDEPEND=" " distutils_enable_tests pytest + +python_test() { + local script="${BUILD_DIR}/install${EPREFIX}/usr/bin/pytest" + cat > "${script}" <<-EOF + #!/usr/bin/env python + import pytest + import sys + sys.exit(pytest.console_main()) + EOF + chmod +x "${script}" || die + epytest -x + rm "${script}" || die +}