Lines Matching +full:test +full:- +full:rules
2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8 -*-
19 logger = logging.getLogger("hidtools.test.base")
140 name = f"uhid test {self.__class__.__name__}"
141 if not name.startswith("uhid test "):
142 name = "uhid test " + self.name
154 # List of kernel modules to load before starting the test
155 # if any module is not available (not compiled), the test will skip.
157 # for example ("playstation", "hid-playstation")
212 sysfs_path = Path("/sys/module") / kernel_module.replace("-", "_")
219 f"module {kernel_module} could not be loaded, skipping the test"
242 test, message, *rest = skip_cond.args
244 if test(self.uhdev):
249 while not self.uhdev.is_ready() and time.time() - now < 5:
288 A context-manager compatible class that sets up our udev rules file and
291 This class is tailored to our test setup: it only sets up the udev rule
294 the session once, then once for each test (the first of which will
295 trigger the udev rule) and once the last test exited and the session
310 self.refs -= 1
318 subprocess.run("udevadm control --reload-rules".split())
319 subprocess.run("systemd-hwdb update".split())
324 os.makedirs("/run/udev/rules.d", exist_ok=True)
326 prefix="91-uhid-test-device-REMOVEME-",
327 suffix=".rules",
329 dir="/run/udev/rules.d",
333 'KERNELS=="*input*", ATTRS{name}=="*uhid test *", ENV{LIBINPUT_IGNORE_DEVICE}="1"\n'
336 …'KERNELS=="*input*", ATTRS{name}=="*uhid test * System Multi Axis", ENV{ID_INPUT_TOUCHSCREEN}="", …