From patchwork Wed Jul 24 16:08:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 46803 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB88EC3DA7E for ; Wed, 24 Jul 2024 16:08:50 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.14792.1721837320974530714 for ; Wed, 24 Jul 2024 09:08:41 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0B5B1DA7 for ; Wed, 24 Jul 2024 09:09:06 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 293FF3F73F for ; Wed, 24 Jul 2024 09:08:40 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 1/4] ptest-packagelists: sort entries Date: Wed, 24 Jul 2024 17:08:29 +0100 Message-Id: <20240724160832.2384962-1-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Jul 2024 16:08:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202459 Sort the entries for OCD reasons. Signed-off-by: Ross Burton --- meta/conf/distro/include/ptest-packagelists.inc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 5e90096b1e8..08a8d612048 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -28,22 +28,23 @@ PTESTS_FAST = "\ json-c \ json-glib \ libconvert-asn1-perl \ + libexif \ libgpg-error\ libnl \ libpcre \ libssh2 \ - libtimedate-perl \ libtest-fatal-perl \ libtest-needs-perl \ libtest-warnings-perl \ + libtimedate-perl \ libtry-tiny-perl \ liburi-perl \ libusb1 \ libxml-namespacesupport-perl \ - libxml-perl \ libxml-parser-perl \ - libxml-sax-perl \ + libxml-perl \ libxml-sax-base-perl \ + libxml-sax-perl \ libxml-simple-perl \ libxml2 \ libxmlb \ @@ -57,6 +58,7 @@ PTESTS_FAST = "\ python3-atomicwrites \ python3-attrs \ python3-bcrypt \ + python3-beartype \ python3-calver \ python3-hypothesis \ python3-jinja2 \ @@ -81,7 +83,6 @@ PTESTS_FAST = "\ wayland \ xz \ zlib \ - libexif \ " PTESTS_FAST:append:libc-glibc = " glibc-y2038-tests" PTESTS_PROBLEMS:remove:libc-glibc = "glibc-y2038-tests" @@ -106,22 +107,22 @@ PTESTS_SLOW = "\ libevent \ libgcrypt \ libmodule-build-perl \ + libseccomp \ lttng-tools \ + lz4 \ openssh \ openssl \ parted \ perl \ - python3-cryptography \ python3 \ python3-click \ + python3-cryptography \ python3-xmltodict \ strace \ tar \ tcl \ util-linux \ valgrind \ - lz4 \ - libseccomp \ " # python3 ptests hang on qemuriscv64 From patchwork Wed Jul 24 16:08:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 46805 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 161B8C49EA1 for ; Wed, 24 Jul 2024 16:08:51 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.14631.1721837321665064285 for ; Wed, 24 Jul 2024 09:08:41 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B82B0DA7 for ; Wed, 24 Jul 2024 09:09:06 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CD7053F73F for ; Wed, 24 Jul 2024 09:08:40 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 2/4] python3-cffi: generalise RDEPENDS Date: Wed, 24 Jul 2024 17:08:30 +0100 Message-Id: <20240724160832.2384962-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240724160832.2384962-1-ross.burton@arm.com> References: <20240724160832.2384962-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Jul 2024 16:08:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202460 There's no need to mark these RDEPENDS as target-only. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-cffi_1.16.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-cffi_1.16.0.bb b/meta/recipes-devtools/python/python3-cffi_1.16.0.bb index 8e829794a56..dfe32c604bd 100644 --- a/meta/recipes-devtools/python/python3-cffi_1.16.0.bb +++ b/meta/recipes-devtools/python/python3-cffi_1.16.0.bb @@ -8,7 +8,7 @@ SRC_URI[sha256sum] = "bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25 inherit pypi python_setuptools_build_meta -RDEPENDS:${PN}:class-target = " \ +RDEPENDS:${PN} = " \ python3-ctypes \ python3-io \ python3-pycparser \ From patchwork Wed Jul 24 16:08:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 46806 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1616CC3DA61 for ; Wed, 24 Jul 2024 16:08:51 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.14633.1721837322569448380 for ; Wed, 24 Jul 2024 09:08:42 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 67D74DA7 for ; Wed, 24 Jul 2024 09:09:07 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 86F9E3F73F for ; Wed, 24 Jul 2024 09:08:41 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 3/4] python3-cffi: enable ptest Date: Wed, 24 Jul 2024 17:08:31 +0100 Message-Id: <20240724160832.2384962-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240724160832.2384962-1-ross.burton@arm.com> References: <20240724160832.2384962-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Jul 2024 16:08:51 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202461 Signed-off-by: Ross Burton --- .../distro/include/ptest-packagelists.inc | 1 + .../python/python3-cffi/run-ptest | 7 ++++++ .../python/python3-cffi_1.16.0.bb | 22 ++++++++++++++++++- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-cffi/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 08a8d612048..3dc1a2e88f1 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -115,6 +115,7 @@ PTESTS_SLOW = "\ parted \ perl \ python3 \ + python3-cffi \ python3-click \ python3-cryptography \ python3-xmltodict \ diff --git a/meta/recipes-devtools/python/python3-cffi/run-ptest b/meta/recipes-devtools/python/python3-cffi/run-ptest new file mode 100644 index 00000000000..24ee6f2156c --- /dev/null +++ b/meta/recipes-devtools/python/python3-cffi/run-ptest @@ -0,0 +1,7 @@ +#!/bin/sh + +# test_passing_large_list often causes an OOM, skip for now + +# test_version verifies that versions match across the source tree, ignore +# as we don't have a source tree +pytest --automake -k 'not test_passing_large_list and not test_version' diff --git a/meta/recipes-devtools/python/python3-cffi_1.16.0.bb b/meta/recipes-devtools/python/python3-cffi_1.16.0.bb index dfe32c604bd..e740ef45be6 100644 --- a/meta/recipes-devtools/python/python3-cffi_1.16.0.bb +++ b/meta/recipes-devtools/python/python3-cffi_1.16.0.bb @@ -6,13 +6,33 @@ DEPENDS += "libffi python3-pycparser" SRC_URI[sha256sum] = "bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0" -inherit pypi python_setuptools_build_meta +SRC_URI += "file://run-ptest" + +inherit pypi python_setuptools_build_meta ptest + +do_install_ptest() { + cp -r ${S}/testing ${D}${PTEST_PATH} + # These two files from the source tree are needed by the tests + install -D -m644 ${S}/src/c/parse_c_type.c ${D}${PTEST_PATH}/src/c/parse_c_type.c + install -D -m644 ${S}/src/cffi/parse_c_type.h ${D}${PTEST_PATH}/src/cffi/parse_c_type.h +} RDEPENDS:${PN} = " \ python3-ctypes \ python3-io \ python3-pycparser \ + python3-setuptools \ python3-shell \ " +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ + python3-dev \ + gcc-symlinks \ + g++-symlinks \ +" + +INSANE_SKIP:${PN}-ptest = "dev-deps" + BBCLASSEXTEND = "native nativesdk" From patchwork Wed Jul 24 16:08:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 46804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAC1EC3DA63 for ; Wed, 24 Jul 2024 16:08:50 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.14793.1721837322982335177 for ; Wed, 24 Jul 2024 09:08:43 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 17E63FEC for ; Wed, 24 Jul 2024 09:09:08 -0700 (PDT) Received: from cesw-amp-gbt-1s-m12830-04.oss.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 36F573F73F for ; Wed, 24 Jul 2024 09:08:42 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Subject: [PATCH 4/4] python3-packaging: enable ptest Date: Wed, 24 Jul 2024 17:08:32 +0100 Message-Id: <20240724160832.2384962-4-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240724160832.2384962-1-ross.burton@arm.com> References: <20240724160832.2384962-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 24 Jul 2024 16:08:50 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/202462 Signed-off-by: Ross Burton --- .../distro/include/ptest-packagelists.inc | 1 + .../python/python3-packaging/run-ptest | 3 +++ .../python/python3-packaging_24.1.bb | 21 ++++++++++++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-packaging/run-ptest diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc index 3dc1a2e88f1..7e9ec1c3aa6 100644 --- a/meta/conf/distro/include/ptest-packagelists.inc +++ b/meta/conf/distro/include/ptest-packagelists.inc @@ -67,6 +67,7 @@ PTESTS_FAST = "\ python3-mako \ python3-markupsafe \ python3-more-itertools \ + python3-packaging \ python3-pluggy \ python3-pyasn1 \ python3-pytz \ diff --git a/meta/recipes-devtools/python/python3-packaging/run-ptest b/meta/recipes-devtools/python/python3-packaging/run-ptest new file mode 100644 index 00000000000..8d2017d39ce --- /dev/null +++ b/meta/recipes-devtools/python/python3-packaging/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta/recipes-devtools/python/python3-packaging_24.1.bb b/meta/recipes-devtools/python/python3-packaging_24.1.bb index 596250b066d..20bcd55fbad 100644 --- a/meta/recipes-devtools/python/python3-packaging_24.1.bb +++ b/meta/recipes-devtools/python/python3-packaging_24.1.bb @@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91" SRC_URI[sha256sum] = "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002" -inherit pypi python_flit_core +SRC_URI += "file://run-ptest" + +inherit pypi python_flit_core ptest BBCLASSEXTEND = "native nativesdk" @@ -16,3 +18,20 @@ RDEPENDS:${PN} += "python3-profile" do_compile:class-native () { python_flit_core_do_manual_build } + +do_install_ptest() { + cp -r ${S}/tests ${D}${PTEST_PATH}/ + # We don't need this script which is used to build the binaries + rm -f ${D}${PTEST_PATH}/tests/manylinux/build.sh +} + +RDEPENDS:${PN}-ptest = "\ + python3-ctypes \ + python3-pretend \ + python3-pytest \ + python3-unittest-automake-output \ +" + +# The ptest package contains prebuilt test binaries +INSANE_SKIP:${PN} = "already-stripped" +INSANE_SKIP:${PN}-ptest = "arch"