support/testing: add libiio python bindings runtime test

Signed-off-by: Marcus Hoffmann <buildroot@bubu1.eu>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
(cherry picked from commit 61966c213322b192a62cc19200902934f9f432d7)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Marcus Hoffmann
2025-12-22 18:26:37 +01:00
committed by Thomas Perale
parent 2060800874
commit e285f646b1
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
import iio
assert len(iio.scan_contexts()) == 1

View File

@@ -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