From 0e456ad6b3eaba314a78ae3e835b8650d39e9673 Mon Sep 17 00:00:00 2001 From: Mingli Yu Date: Mon, 3 Jun 2024 13:47:01 +0800 Subject: python3-dasbus: Add ptest support #./run-ptest PASS: tests/test_client.py:DBusClientTestCase.test_async_method PASS: tests/test_client.py:DBusClientTestCase.test_error PASS: tests/test_client.py:DBusClientTestCase.test_interface_proxy PASS: tests/test_client.py:DBusClientTestCase.test_introspect PASS: tests/test_client.py:DBusClientTestCase.test_invalid_method_result PASS: tests/test_client.py:DBusClientTestCase.test_method PASS: tests/test_client.py:DBusClientTestCase.test_property PASS: tests/test_client.py:DBusClientTestCase.test_signal PASS: tests/test_client.py:DBusClientTestCase.test_variant_type_factory [snip] ============================================================================ Testsuite summary # TOTAL: 162 # PASS: 162 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 Signed-off-by: Mingli Yu Signed-off-by: Khem Raj --- .../conf/include/ptest-packagelists-meta-python.inc | 1 + .../recipes-devtools/python/python3-dasbus/run-ptest | 3 +++ .../recipes-devtools/python/python3-dasbus_1.7.bb | 19 ++++++++++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 meta-python/recipes-devtools/python/python3-dasbus/run-ptest diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc index 2e701dc152..bdcd658d98 100644 --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc @@ -17,6 +17,7 @@ PTESTS_FAST_META_PYTHON = "\ python3-cachetools \ python3-cbor2 \ python3-click \ + python3-dasbus \ python3-dominate \ python3-execnet \ python3-flask \ diff --git a/meta-python/recipes-devtools/python/python3-dasbus/run-ptest b/meta-python/recipes-devtools/python/python3-dasbus/run-ptest new file mode 100755 index 0000000000..8d2017d39c --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-dasbus/run-ptest @@ -0,0 +1,3 @@ +#!/bin/sh + +pytest --automake diff --git a/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb b/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb index 3efa961713..d1d294a284 100644 --- a/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb +++ b/meta-python/recipes-devtools/python/python3-dasbus_1.7.bb @@ -5,11 +5,28 @@ LICENSE = "LGPL-2.1-or-later" LIC_FILES_CHKSUM = "file://LICENSE;md5=1803fa9c2c3ce8cb06b4861d75310742" SRC_URI = "git://github.com/dasbus-project/dasbus.git;protocol=https;branch=master \ + file://run-ptest \ " SRCREV = "413cf9a0b7c231468f1d28d9a29dd8dd8bda15c5" S = "${WORKDIR}/git" -inherit setuptools3 +inherit setuptools3 ptest + +do_install_ptest() { + install -d ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/ + + # Remove the problematic cases + # https://github.com/dasbus-project/dasbus/issues/128 + rm -rf ${D}${PTEST_PATH}/tests/lib_dbus.py + rm -rf ${D}${PTEST_PATH}/tests/test_dbus.py + rm -rf ${D}${PTEST_PATH}/tests/test_unix.py +} RDEPENDS:${PN} = "python3-pygobject" + +RDEPENDS:${PN}-ptest += " \ + python3-pytest \ + python3-unittest-automake-output \ +" -- cgit v1.2.3-54-g00ecf