[Buildroot] [git commit] support/testing: add python-hid test

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu May 9 20:17:00 UTC 2024


commit: https://git.buildroot.net/buildroot/commit/?id=f6542cf10b80a0e44d1301ab7ef9a78c6f24e1d0
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
 DEVELOPERS                                         |  1 +
 support/testing/tests/package/sample_python_hid.py |  3 +++
 support/testing/tests/package/test_python_hid.py   | 13 +++++++++++++
 3 files changed, 17 insertions(+)

diff --git a/DEVELOPERS b/DEVELOPERS
index 8ebeae1af1..0f020231bb 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2520,6 +2520,7 @@ F:	package/triggerhappy/
 F:	package/wireguard-linux-compat/
 F:	package/wireguard-tools/
 F:	support/testing/tests/package/test_docker_compose.py
+F:	support/testing/tests/package/test_python_hid.py
 
 N:	Peter Seiderer <ps.report at gmx.net>
 F:	package/dotconf/
diff --git a/support/testing/tests/package/sample_python_hid.py b/support/testing/tests/package/sample_python_hid.py
new file mode 100644
index 0000000000..a581d7b7cb
--- /dev/null
+++ b/support/testing/tests/package/sample_python_hid.py
@@ -0,0 +1,3 @@
+import hid
+
+hid.enumerate()
diff --git a/support/testing/tests/package/test_python_hid.py b/support/testing/tests/package/test_python_hid.py
new file mode 100644
index 0000000000..b7a280b766
--- /dev/null
+++ b/support/testing/tests/package/test_python_hid.py
@@ -0,0 +1,13 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonHid(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_HID=y
+        BR2_PACKAGE_HIDAPI=y
+        """
+    sample_scripts = ["tests/package/sample_python_hid.py"]



More information about the buildroot mailing list