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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EAA041382C5 for ; Mon, 12 Apr 2021 14:08:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34569E0869; Mon, 12 Apr 2021 14:08:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 140F0E0869 for ; Mon, 12 Apr 2021 14:08:09 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A746A33B864 for ; Mon, 12 Apr 2021 14:08:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EC2BB59C for ; Mon, 12 Apr 2021 14:08:05 +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: <1618236460.b162e302e7d24fc8c858398efc074f8c1372d56b.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pyopenssl/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pyopenssl/pyopenssl-20.0.1.ebuild X-VCS-Directories: dev-python/pyopenssl/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: b162e302e7d24fc8c858398efc074f8c1372d56b X-VCS-Branch: master Date: Mon, 12 Apr 2021 14:08:05 +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: 65e39183-1edb-4533-999c-b369a3ba30a6 X-Archives-Hash: 4be2a4c39a1983a280df13df1995ae5b commit: b162e302e7d24fc8c858398efc074f8c1372d56b Author: Michał Górny gentoo org> AuthorDate: Mon Apr 12 14:07:40 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Apr 12 14:07:40 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b162e302 dev-python/pyopenssl: Skip broken test with 32-bit time_t Closes: https://bugs.gentoo.org/771636 Signed-off-by: Michał Górny gentoo.org> dev-python/pyopenssl/pyopenssl-20.0.1.ebuild | 29 +++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/dev-python/pyopenssl/pyopenssl-20.0.1.ebuild b/dev-python/pyopenssl/pyopenssl-20.0.1.ebuild index 311b787c176..84950bbdcc0 100644 --- a/dev-python/pyopenssl/pyopenssl-20.0.1.ebuild +++ b/dev-python/pyopenssl/pyopenssl-20.0.1.ebuild @@ -6,7 +6,7 @@ EAPI=7 PYTHON_COMPAT=( python3_{7..9} pypy3 ) PYTHON_REQ_USE="threads(+)" -inherit distutils-r1 flag-o-matic +inherit distutils-r1 flag-o-matic toolchain-funcs MY_PN=pyOpenSSL MY_P=${MY_PN}-${PV} @@ -39,13 +39,28 @@ distutils_enable_sphinx doc \ dev-python/sphinx_rtd_theme distutils_enable_tests pytest -python_prepare_all() { - # Requires network access - sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die - distutils-r1_python_prepare_all +src_configure() { + # test for 32-bit time_t + "$(tc-getCC)" ${CFLAGS} ${CPPFLAGS} -c -x c - -o /dev/null <<-EOF &>/dev/null + #include + int test[sizeof(time_t) >= 8 ? 1 : -1]; + EOF + if [[ ${?} -eq 0 ]]; then + PYOPENSSL_SKIP_LARGE_TIME= + einfo "time_t is at least 64-bit long" + else + PYOPENSSL_SKIP_LARGE_TIME=1 + einfo "time_t is smaller than 64 bits, will skip broken tests" + fi } -src_test() { +python_test() { local -x TZ=UTC - distutils-r1_src_test + local deselect=( + tests/test_ssl.py::TestContext::test_set_default_verify_paths + ) + [[ ${PYOPENSSL_SKIP_LARGE_TIME} ]] && deselect+=( + tests/test_crypto.py::TestX509StoreContext::test_verify_with_time + ) + epytest ${deselect[@]/#/--deselect } }