Commit 89ea968a authored by Benjamin Tissoires's avatar Benjamin Tissoires

selftests/hid: skip tests with HID-BPF if udev-hid-bpf is not installed

udev-hid-bpf is still not installed everywhere, and we should probably
not assume it is installed automatically.

Link: https://lore.kernel.org/r/20240506143612.148031-1-bentiss@kernel.orgReviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: default avatarBenjamin Tissoires <bentiss@kernel.org>
parent b22cbfb4
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import libevdev import libevdev
import os import os
import pytest import pytest
import shutil
import subprocess import subprocess
import time import time
...@@ -240,6 +241,10 @@ class BaseTestCase: ...@@ -240,6 +241,10 @@ class BaseTestCase:
root_dir = (script_dir / "../../../../..").resolve() root_dir = (script_dir / "../../../../..").resolve()
bpf_dir = root_dir / "drivers/hid/bpf/progs" bpf_dir = root_dir / "drivers/hid/bpf/progs"
udev_hid_bpf = shutil.which("udev-hid-bpf")
if not udev_hid_bpf:
pytest.skip("udev-hid-bpf not found in $PATH, skipping")
wait = False wait = False
for _, rdesc_fixup in self.hid_bpfs: for _, rdesc_fixup in self.hid_bpfs:
if rdesc_fixup: if rdesc_fixup:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment