mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
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.org Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
This commit is contained in:
parent
b22cbfb42c
commit
89ea968a9d
@ -8,6 +8,7 @@
|
||||
import libevdev
|
||||
import os
|
||||
import pytest
|
||||
import shutil
|
||||
import subprocess
|
||||
import time
|
||||
|
||||
@ -240,6 +241,10 @@ class BaseTestCase:
|
||||
root_dir = (script_dir / "../../../../..").resolve()
|
||||
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
|
||||
for _, rdesc_fixup in self.hid_bpfs:
|
||||
if rdesc_fixup:
|
||||
|
Loading…
Reference in New Issue
Block a user