]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
python3-packaging: enable ptest
authorRoss Burton <ross.burton@arm.com>
Wed, 24 Jul 2024 16:08:32 +0000 (17:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 26 Jul 2024 10:54:28 +0000 (11:54 +0100)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-devtools/python/python3-packaging/run-ptest [new file with mode: 0644]
meta/recipes-devtools/python/python3-packaging_24.1.bb

index f1c6c1b6f4d733e8dbc0d5937e2e097afe7a2b95..3398166d341ac943d3d0ce9d9378fdd3d4e70ddc 100644 (file)
@@ -66,6 +66,7 @@ PTESTS_FAST = "\
     python3-mako \
     python3-markupsafe \
     python3-more-itertools \
+    python3-packaging \
     python3-pluggy \
     python3-pyasn1 \
     python3-pytz \
diff --git a/meta/recipes-devtools/python/python3-packaging/run-ptest b/meta/recipes-devtools/python/python3-packaging/run-ptest
new file mode 100644 (file)
index 0000000..8d2017d
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+pytest --automake
index 596250b066d8c01bf5c4c84881ed62d2b2881952..20bcd55fbad3d6dcbb094de2be5ea2c19cb95863 100644 (file)
@@ -5,7 +5,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=faadaedca9251a90b205c9167578ce91"
 
 SRC_URI[sha256sum] = "026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"
 
-inherit pypi python_flit_core
+SRC_URI += "file://run-ptest"
+
+inherit pypi python_flit_core ptest
 
 BBCLASSEXTEND = "native nativesdk"
 
@@ -16,3 +18,20 @@ RDEPENDS:${PN} += "python3-profile"
 do_compile:class-native () {
     python_flit_core_do_manual_build
 }
+
+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
+}
+
+RDEPENDS:${PN}-ptest = "\
+    python3-ctypes \
+    python3-pretend \
+    python3-pytest \
+    python3-unittest-automake-output \
+"
+
+# The ptest package contains prebuilt test binaries
+INSANE_SKIP:${PN} = "already-stripped"
+INSANE_SKIP:${PN}-ptest = "arch"