From f6542cf10b80a0e44d1301ab7ef9a78c6f24e1d0 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sat, 27 Apr 2024 16:09:40 +0200 Subject: [PATCH] support/testing: add python-hid test Signed-off-by: Peter Korsgaard Signed-off-by: Thomas Petazzoni --- 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 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 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"]