diff mbox series

[06/11] python3-unidiff: upgrade 0.5.4 -> 0.7.5

Message ID 20230517201456.1608917-7-tgamblin@baylibre.com
State New
Headers show
Series patchtest: layer updates | expand

Commit Message

Trevor Gamblin May 17, 2023, 8:14 p.m. UTC
Copy the recipe from meta-python to handle the upgrade, so that
patchtest can build it without requiring the layer.

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
 .../python/python3-unidiff/run-ptest          |  3 +++
 .../python/python3-unidiff_0.5.4.bb           |  9 -------
 .../python/python3-unidiff_0.7.5.bb           | 26 +++++++++++++++++++
 3 files changed, 29 insertions(+), 9 deletions(-)
 create mode 100644 meta-patchtest/recipes-devtools/python/python3-unidiff/run-ptest
 delete mode 100644 meta-patchtest/recipes-devtools/python/python3-unidiff_0.5.4.bb
 create mode 100644 meta-patchtest/recipes-devtools/python/python3-unidiff_0.7.5.bb
diff mbox series

Patch

diff --git a/meta-patchtest/recipes-devtools/python/python3-unidiff/run-ptest b/meta-patchtest/recipes-devtools/python/python3-unidiff/run-ptest
new file mode 100644
index 0000000..b63c4de
--- /dev/null
+++ b/meta-patchtest/recipes-devtools/python/python3-unidiff/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/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}}'
diff --git a/meta-patchtest/recipes-devtools/python/python3-unidiff_0.5.4.bb b/meta-patchtest/recipes-devtools/python/python3-unidiff_0.5.4.bb
deleted file mode 100644
index 5ad9bfc..0000000
--- a/meta-patchtest/recipes-devtools/python/python3-unidiff_0.5.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@ 
-SUMMARY = "Unified diff parsing/metadata extraction library"
-HOMEPAGE = "http://github.com/matiasb/python-unidiff"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4c434b08ef42fea235bb019b5e5a97b3"
-
-SRC_URI[md5sum] = "c8099edf89d2e3bac16123766625a38b"
-SRC_URI[sha256sum] = "a7baf71846a68c5305a7d6005dfb5eca8798f13861176355a285cbda3206824d"
-
-inherit pypi setuptools3
diff --git a/meta-patchtest/recipes-devtools/python/python3-unidiff_0.7.5.bb b/meta-patchtest/recipes-devtools/python/python3-unidiff_0.7.5.bb
new file mode 100644
index 0000000..690acf8
--- /dev/null
+++ b/meta-patchtest/recipes-devtools/python/python3-unidiff_0.7.5.bb
@@ -0,0 +1,26 @@ 
+SUMMARY = "Unified diff parsing/metadata extraction library"
+HOMEPAGE = "http://github.com/matiasb/python-unidiff"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4c434b08ef42fea235bb019b5e5a97b3"
+
+SRC_URI[sha256sum] = "2e5f0162052248946b9f0970a40e9e124236bf86c82b70821143a6fc1dea2574"
+
+inherit pypi setuptools3 ptest
+
+SRC_URI += " \
+        file://run-ptest \
+"
+
+RDEPENDS:${PN}-ptest += " \
+       ${PYTHON_PN}-pytest \
+"
+
+do_install_ptest() {
+      install -d ${D}${PTEST_PATH}/tests
+        cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+}
+
+RDEPENDS:${PN} += " \
+    ${PYTHON_PN}-codecs \
+    ${PYTHON_PN}-io \
+"