From patchwork Tue Mar 21 12:37:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21451 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 8EBD4C761A6 for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11935.1679402271241922926 for ; Tue, 21 Mar 2023 05:37:51 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 017C8AD7; Tue, 21 Mar 2023 05:38:34 -0700 (PDT) Received: from oss-tx204.lab.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 880203F71E; Tue, 21 Mar 2023 05:37:49 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 01/17] python3-numpy: add missing dependency for the tests Date: Tue, 21 Mar 2023 12:37:29 +0000 Message-Id: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178854 Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-numpy_1.24.2.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/python/python3-numpy_1.24.2.bb b/meta/recipes-devtools/python/python3-numpy_1.24.2.bb index 78a857bf160..bfcfc527298 100644 --- a/meta/recipes-devtools/python/python3-numpy_1.24.2.bb +++ b/meta/recipes-devtools/python/python3-numpy_1.24.2.bb @@ -66,6 +66,7 @@ RDEPENDS:${PN}-ptest += "${PYTHON_PN}-pytest \ ${PYTHON_PN}-hypothesis \ ${PYTHON_PN}-sortedcontainers \ ${PYTHON_PN}-resource \ + ${PYTHON_PN}-typing-extensions \ ldd \ " From patchwork Tue Mar 21 12:37:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21454 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 C4872C77B6C for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11934.1679402271217594947 for ; Tue, 21 Mar 2023 05:37:51 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 A13CBC14; Tue, 21 Mar 2023 05:38:34 -0700 (PDT) Received: from oss-tx204.lab.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 3DCDF3F71E; Tue, 21 Mar 2023 05:37:50 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 02/17] python3: missing ptest dependencies Date: Tue, 21 Mar 2023 12:37:30 +0000 Message-Id: <20230321123745.1248462-2-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178855 The tests need a broad set of locales and timezones to be installed. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3_3.11.2.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb b/meta/recipes-devtools/python/python3_3.11.2.bb index 43c147ca6d8..98b25342283 100644 --- a/meta/recipes-devtools/python/python3_3.11.2.bb +++ b/meta/recipes-devtools/python/python3_3.11.2.bb @@ -426,8 +426,8 @@ FILES:${PN}-man = "${datadir}/man" # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395 RDEPENDS:libpython3:append:libc-glibc = " libgcc" RDEPENDS:${PN}-ctypes:append:libc-glibc = " ${MLPREFIX}ldconfig" -RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc tzdata-europe coreutils sed" -RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-tr-tr.iso-8859-9" +RDEPENDS:${PN}-ptest = "${PN}-modules ${PN}-tests ${PN}-dev unzip bzip2 libgcc tzdata coreutils sed" +RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-fr-fr locale-base-en-us locale-base-tr-tr locale-base-de-de" RDEPENDS:${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${MLPREFIX}tk ${MLPREFIX}tk-lib', '', d)}" RDEPENDS:${PN}-idle += "${@bb.utils.contains('PACKAGECONFIG', 'tk', '${PN}-tkinter ${MLPREFIX}tcl', '', d)}" DEV_PKG_DEPENDENCY = "" From patchwork Tue Mar 21 12:37:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21450 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 AD406C77B60 for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11936.1679402271667660439 for ; Tue, 21 Mar 2023 05:37:51 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 4D9C81424; Tue, 21 Mar 2023 05:38:35 -0700 (PDT) Received: from oss-tx204.lab.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 DE33D3F71E; Tue, 21 Mar 2023 05:37:50 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 03/17] python3: add missing -modules dependencies Date: Tue, 21 Mar 2023 12:37:31 +0000 Message-Id: <20230321123745.1248462-3-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178856 The python3-modules package should depend on zoneinfo, and gdbm if it was enabled. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3/python3-manifest.json | 3 ++- meta/recipes-devtools/python/python3_3.11.2.bb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3/python3-manifest.json b/meta/recipes-devtools/python/python3/python3-manifest.json index 58e6f28a692..498402af422 100644 --- a/meta/recipes-devtools/python/python3/python3-manifest.json +++ b/meta/recipes-devtools/python/python3/python3-manifest.json @@ -835,7 +835,8 @@ "unixadmin", "venv", "xml", - "xmlrpc" + "xmlrpc", + "zoneinfo" ], "rrecommends": [ "distutils-windows" diff --git a/meta/recipes-devtools/python/python3_3.11.2.bb b/meta/recipes-devtools/python/python3_3.11.2.bb index 98b25342283..5060722beb9 100644 --- a/meta/recipes-devtools/python/python3_3.11.2.bb +++ b/meta/recipes-devtools/python/python3_3.11.2.bb @@ -417,6 +417,7 @@ RDEPENDS:${PN}-misc += "\ " RDEPENDS:${PN}-modules:append:class-target = " ${MLPREFIX}python3-misc" RDEPENDS:${PN}-modules:append:class-nativesdk = " ${MLPREFIX}python3-misc" +RDEPENDS:${PN}-modules:append:class-target = " ${@bb.utils.contains('PACKAGECONFIG', 'gdbm', '${MLPREFIX}python3-gdbm', '', d)}" FILES:${PN}-misc = "${libdir}/python${PYTHON_MAJMIN} ${libdir}/python${PYTHON_MAJMIN}/lib-dynload" # catch manpage From patchwork Tue Mar 21 12:37:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21453 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 BCC07C6FD1D for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11703.1679402272360423013 for ; Tue, 21 Mar 2023 05:37:52 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 EDC0EAD7; Tue, 21 Mar 2023 05:38:35 -0700 (PDT) Received: from oss-tx204.lab.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 8AB3C3F71E; Tue, 21 Mar 2023 05:37:51 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 04/17] python3-unittest-automake-output: add new recipe for ptest integration Date: Tue, 21 Mar 2023 12:37:32 +0000 Message-Id: <20230321123745.1248462-4-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178857 This package contains modules for both unittest and pytest that alter the output to look like automake's 'make check' output, for better integration with ptest. Signed-off-by: Ross Burton --- meta/conf/distro/include/maintainers.inc | 1 + .../python/python3-unittest-automake-output_0.1.bb | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index ec7ea90d16a..b43a94aae71 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -699,6 +699,7 @@ RECIPE_MAINTAINER:pn-python3-toml = "Tim Orling " RECIPE_MAINTAINER:pn-python3-tomli = "Tim Orling " RECIPE_MAINTAINER:pn-python3-typing-extensions = "Tim Orling " RECIPE_MAINTAINER:pn-python3-typogrify = "Alexander Kanavin " +RECIPE_MAINTAINER:pn-python3-unittest-automake-output = "Ross Burton " RECIPE_MAINTAINER:pn-python3-urllib3 = "Tim Orling " RECIPE_MAINTAINER:pn-python3-vcversioner = "Bruce Ashfield " RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling " diff --git a/meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb b/meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb new file mode 100644 index 00000000000..ba58c18df07 --- /dev/null +++ b/meta/recipes-devtools/python/python3-unittest-automake-output_0.1.bb @@ -0,0 +1,13 @@ +SUMMARY = "Modules to make unittest and pytest look like Automake output, for ptest" +HOMEPAGE = "https://gitlab.com/rossburton/python-unittest-automake-output" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=f6f16008d9fb7349f06609329f1ab93b" + +SRC_URI = "git://gitlab.com/rossburton/python-unittest-automake-output;protocol=https;branch=main" +SRCREV = "06537edb18f3641c70bce25256f6ecf5f5164ead" + +S = "${WORKDIR}/git" + +inherit python_flit_core + +BBCLASSEXTEND = "native nativesdk" From patchwork Tue Mar 21 12:37:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21449 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 AC3B1C761AF for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11937.1679402272933900728 for ; Tue, 21 Mar 2023 05:37:53 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 9A21FC14; Tue, 21 Mar 2023 05:38:36 -0700 (PDT) Received: from oss-tx204.lab.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 370D13F71E; Tue, 21 Mar 2023 05:37:52 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 05/17] python3-atomicwrites: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:33 +0000 Message-Id: <20230321123745.1248462-5-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178858 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-atomicwrites/run-ptest | 2 +- meta/recipes-devtools/python/python3-atomicwrites_1.4.1.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-atomicwrites/run-ptest b/meta/recipes-devtools/python/python3-atomicwrites/run-ptest index b63c4de0d9a..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-atomicwrites/run-ptest +++ b/meta/recipes-devtools/python/python3-atomicwrites/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-atomicwrites_1.4.1.bb b/meta/recipes-devtools/python/python3-atomicwrites_1.4.1.bb index 9f58a4bf1ff..f706f5d7be9 100644 --- a/meta/recipes-devtools/python/python3-atomicwrites_1.4.1.bb +++ b/meta/recipes-devtools/python/python3-atomicwrites_1.4.1.bb @@ -13,6 +13,7 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ ${PYTHON_PN}-unixadmin \ " From patchwork Tue Mar 21 12:37:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21452 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 B00DDC77B61 for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11704.1679402273588551677 for ; Tue, 21 Mar 2023 05:37:53 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 46859AD7; Tue, 21 Mar 2023 05:38:37 -0700 (PDT) Received: from oss-tx204.lab.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 D7A143F71E; Tue, 21 Mar 2023 05:37:52 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 06/17] python3-bcrypt: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:34 +0000 Message-Id: <20230321123745.1248462-6-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178859 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-bcrypt/run-ptest | 2 +- meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-bcrypt/run-ptest b/meta/recipes-devtools/python/python3-bcrypt/run-ptest index b63c4de0d9a..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-bcrypt/run-ptest +++ b/meta/recipes-devtools/python/python3-bcrypt/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb b/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb index 6ce45ca6ee1..9f5b81330bb 100644 --- a/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb +++ b/meta/recipes-devtools/python/python3-bcrypt_4.0.1.bb @@ -17,6 +17,7 @@ require ${BPN}-crates.inc RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21455 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 C29AEC77B62 for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11941.1679402274352528957 for ; Tue, 21 Mar 2023 05:37:54 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 E72CAC14; Tue, 21 Mar 2023 05:38:37 -0700 (PDT) Received: from oss-tx204.lab.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 841EB3F71E; Tue, 21 Mar 2023 05:37:53 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 07/17] python3-cryptography: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:35 +0000 Message-Id: <20230321123745.1248462-7-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178860 Instead of using sed to reformat the output use this new module. This shows that the previous sed expression wasn't sufficient because it didn't handle tests throwing an error, and now the bench/ tests fail because we don't have pytest-benchmark. These tests are more of a benchmark than a unit test, so just skip them. Also show a skip message instead of nothing if the tests were skipped due to a lack of memory. Signed-off-by: Ross Burton --- .../python/python3-cryptography/check-memfree.py | 2 +- .../recipes-devtools/python/python3-cryptography/run-ptest | 7 ++++++- .../recipes-devtools/python/python3-cryptography_39.0.2.bb | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/python/python3-cryptography/check-memfree.py b/meta/recipes-devtools/python/python3-cryptography/check-memfree.py index c111a9074c1..ed680d8d5b9 100755 --- a/meta/recipes-devtools/python/python3-cryptography/check-memfree.py +++ b/meta/recipes-devtools/python/python3-cryptography/check-memfree.py @@ -4,7 +4,7 @@ import sys meminfo = dict((i.split()[0].rstrip(':'),int(i.split()[1])) for i in open('/proc/meminfo').readlines()) mem_free = meminfo['MemTotal']/1024./1024. if mem_free < 2.: - raise RuntimeError("Insufficient free memory({:.3f}): requires > 2 GB".format(mem_free)) + print("Insufficient free memory({:.3f}): requires > 2 GB".format(mem_free)) sys.exit(1) else: print("Free memory: {:.3f} GB".format(mem_free)) diff --git a/meta/recipes-devtools/python/python3-cryptography/run-ptest b/meta/recipes-devtools/python/python3-cryptography/run-ptest index 3089df87819..0954b264a23 100644 --- a/meta/recipes-devtools/python/python3-cryptography/run-ptest +++ b/meta/recipes-devtools/python/python3-cryptography/run-ptest @@ -1,4 +1,9 @@ #!/bin/sh + if ./check-memfree.py; then - pytest -vvvv tests/ -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' + # Skip the bench test module, we don't yet have pytest3-benchmark in core + # and these are more benchmarks than unit tests. + pytest --automake -k bench +else + echo "SKIP: crytography.not_enough_memory" fi diff --git a/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb b/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb index 4b591bc59bf..449e3ba1bcc 100644 --- a/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb +++ b/meta/recipes-devtools/python/python3-cryptography_39.0.2.bb @@ -43,6 +43,7 @@ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pretend \ ${PYTHON_PN}-psutil \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ ${PYTHON_PN}-pytest-subtests \ ${PYTHON_PN}-pytz \ " From patchwork Tue Mar 21 12:37:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21448 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 8DD6DC76195 for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11943.1679402274937973622 for ; Tue, 21 Mar 2023 05:37:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 937B5AD7; Tue, 21 Mar 2023 05:38:38 -0700 (PDT) Received: from oss-tx204.lab.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 309963F71E; Tue, 21 Mar 2023 05:37:54 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 08/17] python3-hypothesis: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:36 +0000 Message-Id: <20230321123745.1248462-8-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178861 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-hypothesis/run-ptest | 2 +- meta/recipes-devtools/python/python3-hypothesis_6.68.2.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-hypothesis/run-ptest b/meta/recipes-devtools/python/python3-hypothesis/run-ptest index 8d44d7c49ac..54f6e7930f1 100644 --- a/meta/recipes-devtools/python/python3-hypothesis/run-ptest +++ b/meta/recipes-devtools/python/python3-hypothesis/run-ptest @@ -7,4 +7,4 @@ # # Instead we run two test suites imported from examples/ -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-hypothesis_6.68.2.bb b/meta/recipes-devtools/python/python3-hypothesis_6.68.2.bb index 23e842f2e28..4ffe278d78a 100644 --- a/meta/recipes-devtools/python/python3-hypothesis_6.68.2.bb +++ b/meta/recipes-devtools/python/python3-hypothesis_6.68.2.bb @@ -27,6 +27,7 @@ RDEPENDS:${PN} += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21447 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 86F25C74A5B for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11707.1679402275561710422 for ; Tue, 21 Mar 2023 05:37:55 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 3FD69C14; Tue, 21 Mar 2023 05:38:39 -0700 (PDT) Received: from oss-tx204.lab.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 D0FC03F71E; Tue, 21 Mar 2023 05:37:54 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 09/17] python3-jinja2: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:37 +0000 Message-Id: <20230321123745.1248462-9-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178862 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-jinja2/run-ptest | 2 +- meta/recipes-devtools/python/python3-jinja2_3.1.2.bb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meta/recipes-devtools/python/python3-jinja2/run-ptest b/meta/recipes-devtools/python/python3-jinja2/run-ptest index 5cec7116968..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-jinja2/run-ptest +++ b/meta/recipes-devtools/python/python3-jinja2/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest +pytest --automake diff --git a/meta/recipes-devtools/python/python3-jinja2_3.1.2.bb b/meta/recipes-devtools/python/python3-jinja2_3.1.2.bb index 80e0b856701..cd248cc0b4f 100644 --- a/meta/recipes-devtools/python/python3-jinja2_3.1.2.bb +++ b/meta/recipes-devtools/python/python3-jinja2_3.1.2.bb @@ -12,8 +12,7 @@ CVE_PRODUCT = "jinja2 jinja" CLEANBROKEN = "1" -inherit pypi setuptools3 -inherit ${@bb.utils.filter('DISTRO_FEATURES', 'ptest', d)} +inherit pypi setuptools3 ptest SRC_URI += " \ file://run-ptest \ @@ -25,9 +24,10 @@ do_install_ptest() { } RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ - ${PYTHON_PN}-toml \ - ${PYTHON_PN}-unixadmin \ + ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ + ${PYTHON_PN}-toml \ + ${PYTHON_PN}-unixadmin \ " RDEPENDS:${PN} += " \ From patchwork Tue Mar 21 12:37:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21456 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 E6D54C77B6E for ; Tue, 21 Mar 2023 12:37:56 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11708.1679402276232153121 for ; Tue, 21 Mar 2023 05:37:56 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 E2C0CAD7; Tue, 21 Mar 2023 05:38:39 -0700 (PDT) Received: from oss-tx204.lab.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 7D4EC3F71E; Tue, 21 Mar 2023 05:37:55 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 10/17] python3-markupsafe: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:38 +0000 Message-Id: <20230321123745.1248462-10-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:37:56 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178863 Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-markupsafe/run-ptest | 2 +- meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/recipes-devtools/python/python3-markupsafe/run-ptest b/meta/recipes-devtools/python/python3-markupsafe/run-ptest index 5cec7116968..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-markupsafe/run-ptest +++ b/meta/recipes-devtools/python/python3-markupsafe/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest +pytest --automake diff --git a/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb b/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb index f4f0ad2df0f..32420529635 100644 --- a/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb +++ b/meta/recipes-devtools/python/python3-markupsafe_2.1.2.bb @@ -6,8 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=ffeffa59c90c9c4a033c7574f8f3fb75" SRC_URI[sha256sum] = "abcabc8c2b26036d62d4c746381a6f7cf60aafcc653198ad678306986b09450d" PYPI_PACKAGE = "MarkupSafe" -inherit pypi setuptools3 -inherit ${@bb.utils.filter('DISTRO_FEATURES', 'ptest', d)} +inherit pypi setuptools3 ptest RDEPENDS:${PN} += "${PYTHON_PN}-stringold" @@ -19,6 +18,7 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21458 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 BB036C6FD1D for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11709.1679402277061920378 for ; Tue, 21 Mar 2023 05:37:57 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 AF9C6C14; Tue, 21 Mar 2023 05:38:40 -0700 (PDT) Received: from oss-tx204.lab.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 325343F71E; Tue, 21 Mar 2023 05:37:56 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 11/17] python3-more-itertools: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:39 +0000 Message-Id: <20230321123745.1248462-11-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178864 Instead of using sed to reformat the output use this new module. The tests also need the statistics module so add this missing dependency. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-more-itertools/run-ptest | 2 +- meta/recipes-devtools/python/python3-more-itertools_9.1.0.bb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-more-itertools/run-ptest b/meta/recipes-devtools/python/python3-more-itertools/run-ptest index 3385d68939d..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-more-itertools/run-ptest +++ b/meta/recipes-devtools/python/python3-more-itertools/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-more-itertools_9.1.0.bb b/meta/recipes-devtools/python/python3-more-itertools_9.1.0.bb index 7602350795f..f5d107c78db 100644 --- a/meta/recipes-devtools/python/python3-more-itertools_9.1.0.bb +++ b/meta/recipes-devtools/python/python3-more-itertools_9.1.0.bb @@ -16,7 +16,9 @@ RDEPENDS:${PN} += " \ " RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-statistics \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21463 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 DDB96C77B62 for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11944.1679402278033396361 for ; Tue, 21 Mar 2023 05:37:58 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 A945FAD7; Tue, 21 Mar 2023 05:38:41 -0700 (PDT) Received: from oss-tx204.lab.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 0D2B73F71E; Tue, 21 Mar 2023 05:37:56 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 12/17] python3-pluggy: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:40 +0000 Message-Id: <20230321123745.1248462-12-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178865 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-pluggy/run-ptest | 2 +- meta/recipes-devtools/python/python3-pluggy_1.0.0.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-pluggy/run-ptest b/meta/recipes-devtools/python/python3-pluggy/run-ptest index b63c4de0d9a..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-pluggy/run-ptest +++ b/meta/recipes-devtools/python/python3-pluggy/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-pluggy_1.0.0.bb b/meta/recipes-devtools/python/python3-pluggy_1.0.0.bb index 2935acf95fa..99ae6336b76 100644 --- a/meta/recipes-devtools/python/python3-pluggy_1.0.0.bb +++ b/meta/recipes-devtools/python/python3-pluggy_1.0.0.bb @@ -18,6 +18,7 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21457 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 C2BFAC76195 for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11711.1679402279028202021 for ; Tue, 21 Mar 2023 05:37:59 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 A7DDBC14; Tue, 21 Mar 2023 05:38:42 -0700 (PDT) Received: from oss-tx204.lab.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 14FD63F71E; Tue, 21 Mar 2023 05:37:57 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 13/17] python3-pyasn1: : use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:41 +0000 Message-Id: <20230321123745.1248462-13-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178866 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python-pyasn1.inc | 1 + meta/recipes-devtools/python/python3-pyasn1/run-ptest | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python-pyasn1.inc b/meta/recipes-devtools/python/python-pyasn1.inc index 1b941630e72..126d0388efa 100644 --- a/meta/recipes-devtools/python/python-pyasn1.inc +++ b/meta/recipes-devtools/python/python-pyasn1.inc @@ -24,6 +24,7 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { diff --git a/meta/recipes-devtools/python/python3-pyasn1/run-ptest b/meta/recipes-devtools/python/python3-pyasn1/run-ptest index b63c4de0d9a..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-pyasn1/run-ptest +++ b/meta/recipes-devtools/python/python3-pyasn1/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake From patchwork Tue Mar 21 12:37:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21460 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 D05F0C77B61 for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11946.1679402280098582647 for ; Tue, 21 Mar 2023 05:38:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 BA5ABAD7; Tue, 21 Mar 2023 05:38:43 -0700 (PDT) Received: from oss-tx204.lab.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 0D63B3F71E; Tue, 21 Mar 2023 05:37:58 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 14/17] python3-pytz: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:42 +0000 Message-Id: <20230321123745.1248462-14-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178867 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-pytz/run-ptest | 2 +- meta/recipes-devtools/python/python3-pytz_2022.7.1.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-pytz/run-ptest b/meta/recipes-devtools/python/python3-pytz/run-ptest index b63c4de0d9a..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-pytz/run-ptest +++ b/meta/recipes-devtools/python/python3-pytz/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-pytz_2022.7.1.bb b/meta/recipes-devtools/python/python3-pytz_2022.7.1.bb index 553b9cfa181..e399f2139a7 100644 --- a/meta/recipes-devtools/python/python3-pytz_2022.7.1.bb +++ b/meta/recipes-devtools/python/python3-pytz_2022.7.1.bb @@ -24,6 +24,7 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21461 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 C7883C74A5B for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11714.1679402281295157813 for ; Tue, 21 Mar 2023 05:38:01 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 DFB60AD7; Tue, 21 Mar 2023 05:38:44 -0700 (PDT) Received: from oss-tx204.lab.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 2A7463F71E; Tue, 21 Mar 2023 05:37:59 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 15/17] python3-wcwidth: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:43 +0000 Message-Id: <20230321123745.1248462-15-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178868 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-wcwidth/run-ptest | 2 +- meta/recipes-devtools/python/python3-wcwidth_0.2.6.bb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/python/python3-wcwidth/run-ptest b/meta/recipes-devtools/python/python3-wcwidth/run-ptest index b63c4de0d9a..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-wcwidth/run-ptest +++ b/meta/recipes-devtools/python/python3-wcwidth/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-wcwidth_0.2.6.bb b/meta/recipes-devtools/python/python3-wcwidth_0.2.6.bb index 368146dba48..fbd008c13de 100644 --- a/meta/recipes-devtools/python/python3-wcwidth_0.2.6.bb +++ b/meta/recipes-devtools/python/python3-wcwidth_0.2.6.bb @@ -14,11 +14,12 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { install -d ${D}${PTEST_PATH}/tests - cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ } BBCLASSEXTEND = "native nativesdk" From patchwork Tue Mar 21 12:37:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21462 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 D855FC77B60 for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.11949.1679402282468064813 for ; Tue, 21 Mar 2023 05:38:02 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 1E5EAAD7; Tue, 21 Mar 2023 05:38:46 -0700 (PDT) Received: from oss-tx204.lab.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 534A53F71E; Tue, 21 Mar 2023 05:38:01 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 16/17] python3-webcolors: use python3-unittest-automake-output Date: Tue, 21 Mar 2023 12:37:44 +0000 Message-Id: <20230321123745.1248462-16-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178869 Instead of using sed to reformat the output use this new module. Signed-off-by: Ross Burton --- meta/recipes-devtools/python/python3-webcolors/run-ptest | 2 +- meta/recipes-devtools/python/python3-webcolors_1.12.bb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meta/recipes-devtools/python/python3-webcolors/run-ptest b/meta/recipes-devtools/python/python3-webcolors/run-ptest index 3385d68939d..8d2017d39ce 100644 --- a/meta/recipes-devtools/python/python3-webcolors/run-ptest +++ b/meta/recipes-devtools/python/python3-webcolors/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' +pytest --automake diff --git a/meta/recipes-devtools/python/python3-webcolors_1.12.bb b/meta/recipes-devtools/python/python3-webcolors_1.12.bb index 39ff19c2b8a..02f6c9fed89 100644 --- a/meta/recipes-devtools/python/python3-webcolors_1.12.bb +++ b/meta/recipes-devtools/python/python3-webcolors_1.12.bb @@ -17,6 +17,7 @@ SRC_URI += " \ RDEPENDS:${PN}-ptest += " \ ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() { From patchwork Tue Mar 21 12:37:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 21459 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 C2CF7C761A6 for ; Tue, 21 Mar 2023 12:38:06 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.11717.1679402283700708916 for ; Tue, 21 Mar 2023 05:38:03 -0700 Authentication-Results: mx.groups.io; dkim=missing; 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 57A94C14; Tue, 21 Mar 2023 05:38:47 -0700 (PDT) Received: from oss-tx204.lab.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 8A4143F71E; Tue, 21 Mar 2023 05:38:02 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Cc: nd@arm.com Subject: [PATCH v2 17/17] python3-jsonpointer: rewrite testing Date: Tue, 21 Mar 2023 12:37:45 +0000 Message-Id: <20230321123745.1248462-17-ross.burton@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230321123745.1248462-1-ross.burton@arm.com> References: <20230321123745.1248462-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 ; Tue, 21 Mar 2023 12:38:06 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/178870 The tests installed by jsonpointer use unittest not pytest, so update the dependencies. Use the unittest runner in python3-unittest-automake-output to get the correct output. Apply a patch so the test suite doesn't run twice. Signed-off-by: Ross Burton --- .../0001-Clean-up-test-runner.patch | 62 +++++++++++++++++++ .../python/python3-jsonpointer/run-ptest | 2 +- .../python/python3-jsonpointer_2.3.bb | 6 +- 3 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/python/python3-jsonpointer/0001-Clean-up-test-runner.patch diff --git a/meta/recipes-devtools/python/python3-jsonpointer/0001-Clean-up-test-runner.patch b/meta/recipes-devtools/python/python3-jsonpointer/0001-Clean-up-test-runner.patch new file mode 100644 index 00000000000..4121834dbfb --- /dev/null +++ b/meta/recipes-devtools/python/python3-jsonpointer/0001-Clean-up-test-runner.patch @@ -0,0 +1,62 @@ +From 04a864f33848da6af1dea906ba4922770022ef66 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Thu, 16 Mar 2023 14:21:32 +0000 +Subject: [PATCH] Clean up test runner + +Test code doesn't need to manually construct a TestSuite and a +TextTestRunner, the unittest module has a discovery function that does +all this for you. + +Delete all of the manual logic from tests.py, replace it with the two +lines to bring in the doctest unit tests, and update the makefile to +run the unittest discovery. + +Upstream-Status: Submitted [https://github.com/stefankoegl/python-json-pointer/pull/54] +Signed-off-by: Ross Burton +--- + makefile | 2 +- + tests.py | 24 ++++-------------------- + 2 files changed, 5 insertions(+), 21 deletions(-) + +diff --git a/tests.py b/tests.py +index 9252369..6b4b8cc 100755 +--- a/tests.py ++++ b/tests.py +@@ -7,6 +7,7 @@ import doctest + import unittest + import sys + import copy ++import jsonpointer + from jsonpointer import resolve_pointer, EndOfList, JsonPointerException, \ + JsonPointer, set_pointer + +@@ -410,23 +411,6 @@ class AltTypesTests(unittest.TestCase): + self.assertRaises(JsonPointerException, resolve_pointer, doc, '/root/1/2/3/4') + + +- +-suite = unittest.TestSuite() +-suite.addTest(unittest.makeSuite(SpecificationTests)) +-suite.addTest(unittest.makeSuite(ComparisonTests)) +-suite.addTest(unittest.makeSuite(WrongInputTests)) +-suite.addTest(unittest.makeSuite(ToLastTests)) +-suite.addTest(unittest.makeSuite(SetTests)) +-suite.addTest(unittest.makeSuite(AltTypesTests)) +- +-modules = ['jsonpointer'] +- +-for module in modules: +- m = __import__(module, fromlist=[module]) +- suite.addTest(doctest.DocTestSuite(m)) +- +-runner = unittest.TextTestRunner(verbosity=1) +-result = runner.run(suite) +- +-if not result.wasSuccessful(): +- sys.exit(1) ++def load_tests(loader, tests, ignore): ++ tests.addTests(doctest.DocTestSuite(jsonpointer)) ++ return tests +-- +2.34.1 + diff --git a/meta/recipes-devtools/python/python3-jsonpointer/run-ptest b/meta/recipes-devtools/python/python3-jsonpointer/run-ptest index 51e609f4bad..7ebd69231f2 100644 --- a/meta/recipes-devtools/python/python3-jsonpointer/run-ptest +++ b/meta/recipes-devtools/python/python3-jsonpointer/run-ptest @@ -1,3 +1,3 @@ #!/bin/sh -python3 tests.py +python3 -mputao.unittest tests.py diff --git a/meta/recipes-devtools/python/python3-jsonpointer_2.3.bb b/meta/recipes-devtools/python/python3-jsonpointer_2.3.bb index 16d5cab4cfb..0ec4de055c5 100644 --- a/meta/recipes-devtools/python/python3-jsonpointer_2.3.bb +++ b/meta/recipes-devtools/python/python3-jsonpointer_2.3.bb @@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=32b15c843b7a329130f4e266a281ebb3" inherit pypi ptest setuptools3 +SRC_URI += "file://0001-Clean-up-test-runner.patch" + SRC_URI[sha256sum] = "97cba51526c829282218feb99dab1b1e6bdf8efd1c43dc9d57be093c0d69c99a" RDEPENDS:${PN} += " \ @@ -18,7 +20,9 @@ SRC_URI += " \ " RDEPENDS:${PN}-ptest += " \ - ${PYTHON_PN}-pytest \ + ${PYTHON_PN}-doctest \ + ${PYTHON_PN}-unittest \ + ${PYTHON_PN}-unittest-automake-output \ " do_install_ptest() {