Skip to contentSkip to conversation

ptest.bbclass: Handle the case when Makefile does not exist in do_install_ptest_base

PATCH In review Khem Raj 1 participant 3 messages Feb 7, 2024

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 ptest.bbclass: Handle the case when Makefile does not exist in do_install_ptest_base

Some recipes e.g. expant generate ninja files and no Makefile may exist, therefore grep -q would fail on a non-existent file, we just need the return code to decide if intall-ptest target should be run or not.

Fixes errors like
| grep: Makefile: No such file or directory

---
 meta/classes-recipe/ptest.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/classes-recipe/ptest.bbclass +3 -3
index a1c3c3f1a65..348d729aef1 100644
@@ -56,9 +56,9 @@ do_install_ptest_base() {
     if [ -f ${WORKDIR}/run-ptest ]; then
         install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
     fi
-    if grep -q install-ptest: Makefile; then
-        oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
-    fi
+
+    grep -q install-ptest: Makefile 2>/dev/null && oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
+
     do_install_ptest
     chown -R root:root ${D}${PTEST_PATH}
 
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/2 expat: Upgrade to 2.6.0

Package and run benchmark as part of ptest This is a major release with following changes [1]

[1] https://github.com/libexpat/libexpat/blob/R_2_6_0/expat/Changes

---
 meta/recipes-core/expat/expat/run-ptest                    | 2 +-
 meta/recipes-core/expat/{expat_2.5.0.bb => expat_2.6.0.bb} | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
 rename meta/recipes-core/expat/{expat_2.5.0.bb => expat_2.6.0.bb} (82%)
meta/recipes-core/expat/expat/run-ptest +1 -1
index dbf602ca800..ff7986db3cf 100644
@@ -5,5 +5,5 @@ TIME=$(which time)
 echo "runtests"
 ${TIME} -f 'Execution time: %e s' bash -c "./runtests -v"
 echo "runtestspp"
-${TIME} -f 'Execution time: %e s' bash -c "./runtestspp -v"
+${TIME} -f 'Execution time: %e s' bash -c "./runtests_cxx -v"
 echo
meta/recipes-core/expat/expat_2.6.0.bb renamed from meta/recipes-core/expat/expat_2.5.0.bb +3 -2
similarity index 82%
rename from meta/recipes-core/expat/expat_2.5.0.bb
rename to meta/recipes-core/expat/expat_2.6.0.bb
index aa8d439d5fb..1f9f7b269a4 100644
@@ -15,7 +15,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2  \
 GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/"
 UPSTREAM_CHECK_REGEX = "releases/tag/R_(?P<pver>.+)"
 
-SRC_URI[sha256sum] = "6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67"
+SRC_URI[sha256sum] = "ff60e6a6b6ce570ae012dc7b73169c7fdf4b6bf08c12ed0ec6f55736b78d85ba"
 
 EXTRA_OECMAKE:class-native += "-DEXPAT_BUILD_DOCS=OFF"
 
@@ -24,7 +24,8 @@ RDEPENDS:${PN}-ptest += "bash"
 inherit cmake lib_package ptest github-releases
 
 do_install_ptest:class-target() {
-	install -m 755 ${B}/tests/* ${D}${PTEST_PATH}
+	install -m 755 ${B}/tests/runtests* ${D}${PTEST_PATH}
+	install -m 755 ${B}/tests/benchmark/benchmark ${D}${PTEST_PATH}
 }
 
 BBCLASSEXTEND += "native nativesdk"
Signature · 1 line
2.43.0
author
#2 lore raw

Re: [PATCH 2/2] expat: Upgrade to 2.6.0

This will cause a cython ptest regression as reported here

https://github.com/python/cpython/issues/115133

There is a patch proposed for cython and in progress, we can hold on to this patch for the moment.

Quoted 53 lines · Khem Raj

Package and run benchmark as part of ptest This is a major release with following changes [1]

[1] https://github.com/libexpat/libexpat/blob/R_2_6_0/expat/Changes

---
 meta/recipes-core/expat/expat/run-ptest                    | 2 +-
 meta/recipes-core/expat/{expat_2.5.0.bb => expat_2.6.0.bb} | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
 rename meta/recipes-core/expat/{expat_2.5.0.bb => expat_2.6.0.bb} (82%)
meta/recipes-core/expat/expat/run-ptest +1 -1
index dbf602ca800..ff7986db3cf 100644
@@ -5,5 +5,5 @@ TIME=$(which time)
 echo "runtests"
 ${TIME} -f 'Execution time: %e s' bash -c "./runtests -v"
 echo "runtestspp"
-${TIME} -f 'Execution time: %e s' bash -c "./runtestspp -v"
+${TIME} -f 'Execution time: %e s' bash -c "./runtests_cxx -v"
 echo
meta/recipes-core/expat/expat_2.6.0.bb renamed from meta/recipes-core/expat/expat_2.5.0.bb +3 -3
similarity index 82%
rename from meta/recipes-core/expat/expat_2.5.0.bb
rename to meta/recipes-core/expat/expat_2.6.0.bb
index aa8d439d5fb..1f9f7b269a4 100644
@@ -15,7 +15,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2  \
 GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/"
 UPSTREAM_CHECK_REGEX = "releases/tag/R_(?P<pver>.+)"
 
-SRC_URI[sha256sum] = "6f0e6e01f7b30025fa05c85fdad1e5d0ec7fd35d9f61b22f34998de11969ff67"
+SRC_URI[sha256sum] = "ff60e6a6b6ce570ae012dc7b73169c7fdf4b6bf08c12ed0ec6f55736b78d85ba"
 
 EXTRA_OECMAKE:class-native += "-DEXPAT_BUILD_DOCS=OFF"
 
@@ -24,7 +24,8 @@ RDEPENDS:${PN}-ptest += "bash"
 inherit cmake lib_package ptest github-releases
 
 do_install_ptest:class-target() {
-       install -m 755 ${B}/tests/* ${D}${PTEST_PATH}
+       install -m 755 ${B}/tests/runtests* ${D}${PTEST_PATH}
+       install -m 755 ${B}/tests/benchmark/benchmark ${D}${PTEST_PATH}
 }
 
 BBCLASSEXTEND += "native nativesdk"
--

2.43.0