@@ -2674,10 +2674,12 @@ F: support/testing/tests/package/sample_python_jmespath.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_sdbus.py
+F: support/testing/tests/package/sample_python_sdbus_networkmanager.py
F: support/testing/tests/package/test_python_jmespath.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_sdbus.py
+F: support/testing/tests/package/test_python_sdbus_networkmanager.py
N: Raphael Pavlidis <raphael.pavlidis@gmail.com>
F: package/nvidia-persistenced/
new file mode 100644
@@ -0,0 +1,20 @@
+#!/usr/bin/env python3
+
+import sdbus
+
+from sdbus_block.networkmanager import (
+ DeviceType,
+ NetworkManager,
+ NetworkDeviceGeneric
+)
+
+sdbus.set_default_bus(sdbus.sd_bus_open_system())
+
+nm = NetworkManager()
+devices = [NetworkDeviceGeneric(d) for d in nm.get_devices()]
+
+print([d.interface for d in devices])
+
+assert devices
+# Check that we found at least the loopback interface:
+assert [dev for dev in devices if dev.device_type == DeviceType.LOOPBACK]
new file mode 100644
@@ -0,0 +1,15 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3SdbusNetworkmanager(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_INIT_SYSTEMD=y
+ BR2_PACKAGE_NETWORK_MANAGER=y
+ BR2_PACKAGE_PYTHON_SDBUS_NETWORKMANAGER=y
+ """
+ sample_scripts = ["tests/package/sample_python_sdbus_networkmanager.py"]
+
+ timeout = 30
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be> --- DEVELOPERS | 2 ++ .../sample_python_sdbus_networkmanager.py | 20 +++++++++++++++++++ .../test_python_sdbus_networkmanager.py | 15 ++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 support/testing/tests/package/sample_python_sdbus_networkmanager.py create mode 100644 support/testing/tests/package/test_python_sdbus_networkmanager.py