]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
python3-cffi: enable ptest
authorRoss Burton <ross.burton@arm.com>
Wed, 24 Jul 2024 16:08:31 +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-cffi/run-ptest [new file with mode: 0644]
meta/recipes-devtools/python/python3-cffi_1.16.0.bb

index 4025883cca656683cc12cec65458a80d661357ed..f1c6c1b6f4d733e8dbc0d5937e2e097afe7a2b95 100644 (file)
@@ -114,6 +114,7 @@ PTESTS_SLOW = "\
     parted \
     perl \
     python3 \
+    python3-cffi \
     python3-click \
     python3-cryptography \
     python3-xmltodict \
diff --git a/meta/recipes-devtools/python/python3-cffi/run-ptest b/meta/recipes-devtools/python/python3-cffi/run-ptest
new file mode 100644 (file)
index 0000000..24ee6f2
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# test_passing_large_list often causes an OOM, skip for now
+
+# test_version verifies that versions match across the source tree, ignore
+# as we don't have a source tree
+pytest --automake -k 'not test_passing_large_list and not test_version'
index dfe32c604bdb0807ab813eeffb1251f3accceab4..e740ef45be6dc40560c0261b6ee145c49fefe196 100644 (file)
@@ -6,13 +6,33 @@ DEPENDS += "libffi python3-pycparser"
 
 SRC_URI[sha256sum] = "bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0"
 
-inherit pypi python_setuptools_build_meta
+SRC_URI += "file://run-ptest"
+
+inherit pypi python_setuptools_build_meta ptest
+
+do_install_ptest() {
+    cp -r ${S}/testing ${D}${PTEST_PATH}
+    # These two files from the source tree are needed by the tests
+    install -D -m644 ${S}/src/c/parse_c_type.c ${D}${PTEST_PATH}/src/c/parse_c_type.c
+    install -D -m644 ${S}/src/cffi/parse_c_type.h ${D}${PTEST_PATH}/src/cffi/parse_c_type.h
+}
 
 RDEPENDS:${PN} = " \
     python3-ctypes \
     python3-io \
     python3-pycparser \
+    python3-setuptools \
     python3-shell \
 "
 
+RDEPENDS:${PN}-ptest += " \
+    python3-pytest \
+    python3-unittest-automake-output \
+    python3-dev \
+    gcc-symlinks \
+    g++-symlinks \
+"
+
+INSANE_SKIP:${PN}-ptest = "dev-deps"
+
 BBCLASSEXTEND = "native nativesdk"