diff mbox series

[v3,2/3] python3-packaging: Ignore old glibc tests on musl

Message ID 20241022062721.4131585-2-raj.khem@gmail.com
State New
Headers show
Series [v3,1/3] python3: Fix platform triplet detection | expand

Commit Message

Khem Raj Oct. 22, 2024, 6:27 a.m. UTC
These tests expect glibc to be the system C library
ignore them for musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
v2: Use bitbake variable for ignored tests
v3: apply chmod to make the script executable

 meta/recipes-devtools/python/python3-packaging/run-ptest   | 3 ---
 .../recipes-devtools/python/python3-packaging/run-ptest.in | 2 ++
 meta/recipes-devtools/python/python3-packaging_24.1.bb     | 7 ++++++-
 3 files changed, 8 insertions(+), 4 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python3-packaging/run-ptest
 create mode 100644 meta/recipes-devtools/python/python3-packaging/run-ptest.in
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-packaging/run-ptest b/meta/recipes-devtools/python/python3-packaging/run-ptest
deleted file mode 100644
index 8d2017d39ce..00000000000
--- a/meta/recipes-devtools/python/python3-packaging/run-ptest
+++ /dev/null
@@ -1,3 +0,0 @@ 
-#!/bin/sh
-
-pytest --automake
diff --git a/meta/recipes-devtools/python/python3-packaging/run-ptest.in b/meta/recipes-devtools/python/python3-packaging/run-ptest.in
new file mode 100644
index 00000000000..508538463bb
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-packaging/run-ptest.in
@@ -0,0 +1,2 @@ 
+#!/bin/sh
+pytest --automake IGNOREDTESTS
diff --git a/meta/recipes-devtools/python/python3-packaging_24.1.bb b/meta/recipes-devtools/python/python3-packaging_24.1.bb
index 20bcd55fbad..6986880ac51 100644
--- a/meta/recipes-devtools/python/python3-packaging_24.1.bb
+++ b/meta/recipes-devtools/python/python3-packaging_24.1.bb
@@ -5,7 +5,7 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91"
 
 SRC_URI[sha256sum] = "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"
 
-SRC_URI += "file://run-ptest"
+SRC_URI += "file://run-ptest.in"
 
 inherit pypi python_flit_core ptest
 
@@ -15,6 +15,9 @@  BBCLASSEXTEND = "native nativesdk"
 DEPENDS:remove:class-native = "python3-build-native"
 RDEPENDS:${PN} += "python3-profile"
 
+SKIPLIST ?= ""
+SKIPLIST:libc-musl = "--deselect tests/test_manylinux.py::test_is_manylinux_compatible_old --ignore=tests/test_tags.py"
+
 do_compile:class-native () {
     python_flit_core_do_manual_build
 }
@@ -23,6 +26,8 @@  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
+    sed -e 's|IGNOREDTESTS|${SKIPLIST}|' ${UNPACKDIR}/run-ptest.in > ${D}${PTEST_PATH}/run-ptest
+    chmod 0755 ${D}${PTEST_PATH}/run-ptest
 }
 
 RDEPENDS:${PN}-ptest = "\