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 0AAD1158086 for ; Fri, 31 Dec 2021 09:10:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2BA772BC006; Fri, 31 Dec 2021 09:10:17 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 079A42BC006 for ; Fri, 31 Dec 2021 09:10:17 +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 E3E8A342D10 for ; Fri, 31 Dec 2021 09:10:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 60E8126F for ; Fri, 31 Dec 2021 09:10:11 +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: <1640941774.7d07fee32109260cfa3018c29a3a45d589a82d60.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/tests/python-utils-r1.sh X-VCS-Directories: eclass/tests/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 7d07fee32109260cfa3018c29a3a45d589a82d60 X-VCS-Branch: master Date: Fri, 31 Dec 2021 09:10:11 +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: 197a78c9-01f4-433b-88b5-6425d60d563f X-Archives-Hash: 4d4abeb286e5571e6e3949928498b80e commit: 7d07fee32109260cfa3018c29a3a45d589a82d60 Author: Michał Górny gentoo org> AuthorDate: Fri Dec 31 09:09:34 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Dec 31 09:09:34 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d07fee3 eclass/tests/python-utils-r1.sh: Remove obsoletep py2 usage Signed-off-by: Michał Górny gentoo.org> eclass/tests/python-utils-r1.sh | 46 ++++++++++------------------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh index 1cd5cdbf6c0a..7ba4a864ff10 100755 --- a/eclass/tests/python-utils-r1.sh +++ b/eclass/tests/python-utils-r1.sh @@ -162,68 +162,44 @@ test_is "python_is_python3 pypy" 1 test_is "python_is_python3 pypy3" 0 # generic shebangs -test_fix_shebang '#!/usr/bin/python' python2.7 '#!/usr/bin/python2.7' test_fix_shebang '#!/usr/bin/python' python3.6 '#!/usr/bin/python3.6' test_fix_shebang '#!/usr/bin/python' pypy3 '#!/usr/bin/pypy3' # python2/python3 matching -test_fix_shebang '#!/usr/bin/python2' python2.7 '#!/usr/bin/python2.7' -test_fix_shebang '#!/usr/bin/python3' python2.7 FAIL -test_fix_shebang '#!/usr/bin/python3' python2.7 '#!/usr/bin/python2.7' --force test_fix_shebang '#!/usr/bin/python3' python3.6 '#!/usr/bin/python3.6' test_fix_shebang '#!/usr/bin/python2' python3.6 FAIL test_fix_shebang '#!/usr/bin/python2' python3.6 '#!/usr/bin/python3.6' --force # pythonX.Y matching (those mostly test the patterns) -test_fix_shebang '#!/usr/bin/python2.7' python2.7 '#!/usr/bin/python2.7' test_fix_shebang '#!/usr/bin/python2.7' python3.2 FAIL test_fix_shebang '#!/usr/bin/python2.7' python3.2 '#!/usr/bin/python3.2' --force test_fix_shebang '#!/usr/bin/python3.2' python3.2 '#!/usr/bin/python3.2' -test_fix_shebang '#!/usr/bin/python3.2' python2.7 FAIL -test_fix_shebang '#!/usr/bin/python3.2' python2.7 '#!/usr/bin/python2.7' --force -test_fix_shebang '#!/usr/bin/pypy' python2.7 FAIL -test_fix_shebang '#!/usr/bin/pypy' python2.7 '#!/usr/bin/python2.7' --force # fancy path handling test_fix_shebang '#!/mnt/python2/usr/bin/python' python3.6 \ '#!/mnt/python2/usr/bin/python3.6' -test_fix_shebang '#!/mnt/python2/usr/bin/python2' python2.7 \ - '#!/mnt/python2/usr/bin/python2.7' -test_fix_shebang '#!/mnt/python2/usr/bin/env python' python2.7 \ - '#!/mnt/python2/usr/bin/env python2.7' -test_fix_shebang '#!/mnt/python2/usr/bin/python2 python2' python2.7 \ - '#!/mnt/python2/usr/bin/python2.7 python2' -test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 FAIL -test_fix_shebang '#!/mnt/python2/usr/bin/python3 python2' python2.7 \ - '#!/mnt/python2/usr/bin/python2.7 python2' --force -test_fix_shebang '#!/usr/bin/foo' python2.7 FAIL +test_fix_shebang '#!/mnt/python2/usr/bin/python3' python3.8 \ + '#!/mnt/python2/usr/bin/python3.8' +test_fix_shebang '#!/mnt/python2/usr/bin/env python' python3.8 \ + '#!/mnt/python2/usr/bin/env python3.8' +test_fix_shebang '#!/mnt/python2/usr/bin/python3 python3' python3.8 \ + '#!/mnt/python2/usr/bin/python3.8 python3' +test_fix_shebang '#!/mnt/python2/usr/bin/python2 python3' python3.8 FAIL +test_fix_shebang '#!/mnt/python2/usr/bin/python2 python3' python3.8 \ + '#!/mnt/python2/usr/bin/python3.8 python3' --force +test_fix_shebang '#!/usr/bin/foo' python3.8 FAIL # regression test for bug #522080 -test_fix_shebang '#!/usr/bin/python ' python2.7 '#!/usr/bin/python2.7 ' +test_fix_shebang '#!/usr/bin/python ' python3.8 '#!/usr/bin/python3.8 ' # check _python_impl_matches behavior -test_is "_python_impl_matches python2_7 -2" 0 -test_is "_python_impl_matches python3_6 -2" 1 -test_is "_python_impl_matches python3_7 -2" 1 -test_is "_python_impl_matches pypy3 -2" 1 -test_is "_python_impl_matches python2_7 -3" 1 test_is "_python_impl_matches python3_6 -3" 0 test_is "_python_impl_matches python3_7 -3" 0 test_is "_python_impl_matches pypy3 -3" 0 -test_is "_python_impl_matches python2_7 -2 python3_6" 0 -test_is "_python_impl_matches python3_6 -2 python3_6" 0 -test_is "_python_impl_matches python3_7 -2 python3_6" 1 -test_is "_python_impl_matches pypy3 -2 python3_6" 1 -test_is "_python_impl_matches python2_7 pypy3 -2 python3_6" 0 -test_is "_python_impl_matches python3_6 pypy3 -2 python3_6" 0 -test_is "_python_impl_matches python3_7 pypy3 -2 python3_6" 1 -test_is "_python_impl_matches pypy3 pypy3 -2 python3_6" 0 set -f -test_is "_python_impl_matches python2_7 pypy*" 1 test_is "_python_impl_matches python3_6 pypy*" 1 test_is "_python_impl_matches python3_7 pypy*" 1 test_is "_python_impl_matches pypy3 pypy*" 0 -test_is "_python_impl_matches python2_7 python*" 0 test_is "_python_impl_matches python3_6 python*" 0 test_is "_python_impl_matches python3_7 python*" 0 test_is "_python_impl_matches pypy3 python*" 1