From patchwork Sun Jun 25 21:39:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jasper Orschulko X-Patchwork-Id: 26390 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 ECD12C001B0 for ; Sun, 25 Jun 2023 21:42:37 +0000 (UTC) Received: from mx.walter.deinstapel.de (mx.walter.deinstapel.de [62.176.232.99]) by mx.groups.io with SMTP id smtpd.web11.20611.1687729307225217797 for ; Sun, 25 Jun 2023 14:41:49 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@fancydomain.eu header.s=mail header.b=Z1lKmEn1; spf=pass (domain: fancydomain.eu, ip: 62.176.232.99, mailfrom: jasper@fancydomain.eu) From: "Jasper Orschulko" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fancydomain.eu; s=mail; t=1687729304; bh=oCUQpAuEMv57O7SZ6MqQWHCCVAqmSAPBCimuE5JbFYo=; h=From:To:Cc:Subject:In-Reply-To:References; b=Z1lKmEn1JmTQjexOf2TGuFxH0lMDZI/XKad0VUisyfWFMLjXjk/IgJikMu3HBAKn8 8N4LQEqQ60EH7H7RE45RHuy61uBRZ8c1xczqKFpRFdwfH9be2EKvozs0GFevlpNb5n QHrOI4RXO2ZZSCkCk4nb6eq3Cc/ZJWcK0OcReW/TRZSdT3onMnYQXCniL7ut3giSMU gjVrMSY78zFODrmPoBMiKnLTQLieBxStEsu6vikJ0UssU4Uj9npU7xC0Op32tlneNe GA8stMS3CweTcPl16uoBZRMhh7XVohlWABp7FKiBiYz1Y98cZzHDRLr9R6xq9BJguh UR0CnmwgVJdRw== To: openembedded-devel@lists.openembedded.org Cc: Jasper Orschulko Subject: [meta-python][PATCH 2/3] python3-covdefaults: Add initial recipe 2.3.0 Date: Sun, 25 Jun 2023 23:39:58 +0200 Message-ID: <20230625213959.2791472-2-jasper@fancydomain.eu> In-Reply-To: <20230625213959.2791472-1-jasper@fancydomain.eu> References: <20230625213959.2791472-1-jasper@fancydomain.eu> 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 ; Sun, 25 Jun 2023 21:42:37 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/103567 Dependency for python3-platformdirs 3.6.0 ptest Signed-off-by: Jasper Orschulko --- .../python/python3-covdefaults/run-ptest | 3 ++ .../python/python3-covdefaults_2.3.0.bb | 31 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-covdefaults/run-ptest create mode 100644 meta-python/recipes-devtools/python/python3-covdefaults_2.3.0.bb diff --git a/meta-python/recipes-devtools/python/python3-covdefaults/run-ptest b/meta-python/recipes-devtools/python/python3-covdefaults/run-ptest new file mode 100644 index 0000000000..3385d68939 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-covdefaults/run-ptest @@ -0,0 +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}}' diff --git a/meta-python/recipes-devtools/python/python3-covdefaults_2.3.0.bb b/meta-python/recipes-devtools/python/python3-covdefaults_2.3.0.bb new file mode 100644 index 0000000000..b7709aa1ca --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-covdefaults_2.3.0.bb @@ -0,0 +1,31 @@ +SUMMARY = "A coverage plugin to provide sensible default settings" +HOMEPAGE = "https://github.com/asottile/covdefaults" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a3da826da635201a80d2fb40f3034929" + +# Use GitHub SRC_URI, as pypi package does not include tests +SRC_URI += " \ + git://github.com/asottile/covdefaults.git;branch=main;protocol=https \ + file://run-ptest \ +" + +SRCREV = "007f5aff5d1c817883385a5f61f742dd11776dc6" + +S = "${WORKDIR}/git" + +inherit setuptools3 ptest + +RDEPENDS:${PN} += " \ + ${PYTHON_PN}-coverage \ +" + +RDEPENDS:${PN}-ptest += " \ + ${PYTHON_PN}-pytest \ +" + +do_install_ptest() { + install -d ${D}${PTEST_PATH} + cp -rf ${S}/tests ${D}${PTEST_PATH} +} + +BBCLASSEXTEND = "native nativesdk"