[Buildroot] [PATCH 2/2] support/testing: add python-hid test
Peter Korsgaard
peter at korsgaard.com
Sat Apr 27 14:09:40 UTC 2024
Signed-off-by: Peter Korsgaard <peter at korsgaard.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(+)
create mode 100644 support/testing/tests/package/sample_python_hid.py
create mode 100644 support/testing/tests/package/test_python_hid.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 29c32f0a11..f426aa376e 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2494,6 +2494,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"]
--
2.39.2
More information about the buildroot
mailing list