From 820df57a933bd1a48abd3a9da5e7dd7e068644eb Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Mon, 22 Dec 2025 18:26:37 +0100 Subject: [PATCH] support/testing: add libiio python bindings runtime test Signed-off-by: Marcus Hoffmann Signed-off-by: Thomas Petazzoni (cherry picked from commit 61966c213322b192a62cc19200902934f9f432d7) Signed-off-by: Thomas Perale --- .../tests/package/sample_libiio_bindings_python.py | 3 +++ .../tests/package/test_libiio_bindings_python.py | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 support/testing/tests/package/sample_libiio_bindings_python.py create mode 100644 support/testing/tests/package/test_libiio_bindings_python.py diff --git a/support/testing/tests/package/sample_libiio_bindings_python.py b/support/testing/tests/package/sample_libiio_bindings_python.py new file mode 100644 index 0000000000..74452192c2 --- /dev/null +++ b/support/testing/tests/package/sample_libiio_bindings_python.py @@ -0,0 +1,3 @@ +import iio + +assert len(iio.scan_contexts()) == 1 diff --git a/support/testing/tests/package/test_libiio_bindings_python.py b/support/testing/tests/package/test_libiio_bindings_python.py new file mode 100644 index 0000000000..e8cf5c3d13 --- /dev/null +++ b/support/testing/tests/package/test_libiio_bindings_python.py @@ -0,0 +1,13 @@ +from tests.package.test_python import TestPythonPackageBase + + +class TestLibiioBindingsPython(TestPythonPackageBase): + __test__ = True + config = TestPythonPackageBase.config + \ + """ + BR2_PACKAGE_PYTHON3=y + BR2_PACKAGE_LIBIIO=y + BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON=y + """ + sample_scripts = ["tests/package/sample_libiio_bindings_python.py"] + timeout = 10