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 CB5D6138350 for ; Fri, 24 Apr 2020 13:07:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B831E0B78; Fri, 24 Apr 2020 13:07:49 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 EBBE8E0B78 for ; Fri, 24 Apr 2020 13:07:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 7CB4734F1A3 for ; Fri, 24 Apr 2020 13:07:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 28BE71C5 for ; Fri, 24 Apr 2020 13:07:45 +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: <1587733656.27c3b87b684cdc2ad666cdbf8d56327cf4e8402d.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/twisted/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/twisted/twisted-19.10.0.ebuild X-VCS-Directories: dev-python/twisted/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 27c3b87b684cdc2ad666cdbf8d56327cf4e8402d X-VCS-Branch: master Date: Fri, 24 Apr 2020 13:07:45 +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: c1ae6fca-4b8c-4d1c-abb6-1b0465b7b434 X-Archives-Hash: 25b8e85c965a1c89391e6ce5de0bfd63 commit: 27c3b87b684cdc2ad666cdbf8d56327cf4e8402d Author: Michał Górny gentoo org> AuthorDate: Fri Apr 24 13:05:13 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Apr 24 13:07:36 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27c3b87b dev-python/twisted: Fix tests with py3.{6,7} Closes: https://bugs.gentoo.org/705852 Signed-off-by: Michał Górny gentoo.org> dev-python/twisted/twisted-19.10.0.ebuild | 58 ++++++++++++++----------------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/dev-python/twisted/twisted-19.10.0.ebuild b/dev-python/twisted/twisted-19.10.0.ebuild index 1fedad60368..540e74f97ed 100644 --- a/dev-python/twisted/twisted-19.10.0.ebuild +++ b/dev-python/twisted/twisted-19.10.0.ebuild @@ -82,19 +82,31 @@ DEPEND=" S=${WORKDIR}/${TWISTED_P} python_prepare_all() { - # No allowed tests are garaunteed to work on py3.5 or py3.8 - if use test ; then - # Remove since this is an upstream distribution test for making releases - rm src/twisted/python/test/test_release.py || die "rm src/twisted/python/test/test_release.py FAILED" - - # Remove these as they are known to fail -- fix (py2.7 - py3.6) - rm src/twisted/conch/test/test_ckeygen.py || die "rm src/twisted/conch/test/test_ckeygen.py FAILED" - rm src/twisted/pair/test/test_tuntap.py || die "rm src/twisted/pair/test/test_tuntap.py FAILED" - rm src/twisted/test/test_log.py || die "rm src/twisted/test/test_log.py FAILED" + # puts system in EMFILE state, then the exception handler may fail + # trying to open more files due to some gi magic + sed -e '/SKIP_EMFILE/s:None:"Fails on non-pristine systems":' \ + -i src/twisted/internet/test/test_tcp.py || die + + # TODO: times out, i can't find where to increase the timeout + sed -e 's:test_manyProcesses:_&:' \ + -i src/twisted/test/test_process.py || die + + # multicast tests fail within network-sandbox + sed -e 's:test_joinLeave:_&:' \ + -e 's:test_loopback:_&:' \ + -e 's:test_multiListen:_&:' \ + -e 's:test_multicast:_&:' \ + -i src/twisted/test/test_udp.py || die + + # accesses /dev/net/tun + sed -e '/class RealDeviceTestsMixin/a\ + skip = "Requires extra permissions"' \ + -i src/twisted/pair/test/test_tuntap.py || die + + # TODO: figure it out, probably doesn't accept DST date here + sed -e 's:test_getTimezoneOffsetWithoutDaylightSavingTime:_&:' \ + -i src/twisted/test/test_log.py || die - # This test fails only on py3.7 - rm src/twisted/internet/test/test_process.py || die " rm src/twisted/internet/test/test_process.py FAILED" - fi distutils-r1_python_prepare_all } @@ -103,29 +115,11 @@ src_test() { } python_test() { + # TODO: upstream seems to override our build paths distutils_install_for_testing - # workaround for the eclass not installing the entry points - # in the test environment. copy the old 16.3.2 start script - # to run the tests with - cp "${FILESDIR}"/trial "${TEST_DIR}" || die - chmod +x "${TEST_DIR}"/trial || die - - pushd "${TEST_DIR}" > /dev/null || die - - if ! "${TEST_DIR}"/trial twisted; then + "${EPYTHON}" -m twisted.trial twisted || die "Tests failed with ${EPYTHON}" - fi - - if ! "${TEST_DIR}"/trial twisted.test.test_twistd.DaemonizeTests; then - die "DaemonizeTests failed with ${EPYTHON}" - fi - - if ! "${TEST_DIR}"/trial twisted.test.test_reflect.SafeStrTests; then - die "SafeStrTests failed with ${EPYTHON}" - fi - - popd > /dev/null || die } python_install() {