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 6C416158086 for ; Thu, 4 Nov 2021 08:04:26 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B5C5E0924; Thu, 4 Nov 2021 08:04:24 +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 E5381E0923 for ; Thu, 4 Nov 2021 08:04:22 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 9A67C342EE4 for ; Thu, 4 Nov 2021 08:04:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E8DFF1A0 for ; Thu, 4 Nov 2021 08:04:17 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1636013044.8dd1909481af4844bd735c5ab0ecdb64be37c973.arthurzam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pygresql/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pygresql/pygresql-5.2.2.ebuild X-VCS-Directories: dev-python/pygresql/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: 8dd1909481af4844bd735c5ab0ecdb64be37c973 X-VCS-Branch: master Date: Thu, 4 Nov 2021 08:04:17 +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: 13d0e088-3680-42de-8f10-e6e33069857a X-Archives-Hash: 3eb48d3c926bfdcb1c989f5699428688 commit: 8dd1909481af4844bd735c5ab0ecdb64be37c973 Author: Arthur Zamarin gentoo org> AuthorDate: Thu Nov 4 08:03:09 2021 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Thu Nov 4 08:04:04 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8dd19094 dev-python/pygresql: enable tests Closes: https://bugs.gentoo.org/798375 Signed-off-by: Arthur Zamarin gentoo.org> dev-python/pygresql/pygresql-5.2.2.ebuild | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/dev-python/pygresql/pygresql-5.2.2.ebuild b/dev-python/pygresql/pygresql-5.2.2.ebuild index 578b5884f40..5a676aa5de5 100644 --- a/dev-python/pygresql/pygresql-5.2.2.ebuild +++ b/dev-python/pygresql/pygresql-5.2.2.ebuild @@ -13,6 +13,7 @@ MY_P="PyGreSQL-${PV}" DESCRIPTION="A Python interface for the PostgreSQL database" HOMEPAGE="https://pygresql.org/" SRC_URI="mirror://pypi/P/PyGreSQL/${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}" LICENSE="POSTGRESQL" SLOT="0" @@ -21,8 +22,29 @@ KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ~sparc x86" DEPEND="${POSTGRES_DEP}" RDEPEND="${DEPEND}" -S="${WORKDIR}/${MY_P}" -PATCHES=( "${FILESDIR}"/${PN}-5.2-CFLAGS.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-5.2-CFLAGS.patch +) + +distutils_enable_tests unittest + +src_test() { + local db="${T}/pgsql" + initdb --username=portage -D "${db}" || die + pg_ctl -w -D "${db}" start \ + -o "-h '127.0.0.1' -p 5432 -k '${T}'" || die + psql -h "${T}" -U portage -d postgres \ + -c "ALTER ROLE portage WITH PASSWORD 'postgres';" || die + createdb -h "${T}" -U portage unittest || die + + cat > tests/LOCAL_PyGreSQL.py <<-EOF || die + dbhost = '${T}' + EOF + + distutils-r1_src_test + + pg_ctl -w -D "${db}" stop || die +} python_install_all() { local DOCS=( docs/*.rst docs/community/* docs/contents/tutorial.rst )