mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
support/testing: add new test for python-sdbus
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
bb0b465087
commit
4c74afbcaa
@@ -2764,10 +2764,12 @@ F: support/testing/tests/package/sample_python_jmespath.py
|
|||||||
F: support/testing/tests/package/sample_python_pymupdf.py
|
F: support/testing/tests/package/sample_python_pymupdf.py
|
||||||
F: support/testing/tests/package/sample_python_rsa.py
|
F: support/testing/tests/package/sample_python_rsa.py
|
||||||
F: support/testing/tests/package/sample_python_s3transfer.py
|
F: support/testing/tests/package/sample_python_s3transfer.py
|
||||||
|
F: support/testing/tests/package/sample_python_sdbus.py
|
||||||
F: support/testing/tests/package/test_python_jmespath.py
|
F: support/testing/tests/package/test_python_jmespath.py
|
||||||
F: support/testing/tests/package/test_python_pymupdf.py
|
F: support/testing/tests/package/test_python_pymupdf.py
|
||||||
F: support/testing/tests/package/test_python_rsa.py
|
F: support/testing/tests/package/test_python_rsa.py
|
||||||
F: support/testing/tests/package/test_python_s3transfer.py
|
F: support/testing/tests/package/test_python_s3transfer.py
|
||||||
|
F: support/testing/tests/package/test_python_sdbus.py
|
||||||
|
|
||||||
N: Raphael Pavlidis <raphael.pavlidis@gmail.com>
|
N: Raphael Pavlidis <raphael.pavlidis@gmail.com>
|
||||||
F: package/nvidia-persistenced/
|
F: package/nvidia-persistenced/
|
||||||
|
|||||||
13
support/testing/tests/package/sample_python_sdbus.py
Normal file
13
support/testing/tests/package/sample_python_sdbus.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import sdbus
|
||||||
|
from sdbus_block.dbus_daemon import FreedesktopDbus
|
||||||
|
|
||||||
|
s = FreedesktopDbus(sdbus.sd_bus_open_system())
|
||||||
|
|
||||||
|
props = s.properties_get_all_dict()
|
||||||
|
|
||||||
|
print(props)
|
||||||
|
|
||||||
|
# Check for a randomly chosen interface:
|
||||||
|
assert 'org.freedesktop.DBus.Monitoring' in props['interfaces']
|
||||||
12
support/testing/tests/package/test_python_sdbus.py
Normal file
12
support/testing/tests/package/test_python_sdbus.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
from tests.package.test_python import TestPythonPackageBase
|
||||||
|
|
||||||
|
|
||||||
|
class TestPythonPy3Sdbus(TestPythonPackageBase):
|
||||||
|
__test__ = True
|
||||||
|
config = TestPythonPackageBase.config + \
|
||||||
|
"""
|
||||||
|
BR2_PACKAGE_PYTHON3=y
|
||||||
|
BR2_INIT_SYSTEMD=y
|
||||||
|
BR2_PACKAGE_PYTHON_SDBUS=y
|
||||||
|
"""
|
||||||
|
sample_scripts = ["tests/package/sample_python_sdbus.py"]
|
||||||
Reference in New Issue
Block a user