mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 02:10:07 +01:00
test: add a script to check for leftover litest rules
An aborted test run can sometimes leave udev rules as detritus. Test for that so we don't get test case failures triggered by those rules. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
48d6861e74
commit
75aee30919
3 changed files with 26 additions and 0 deletions
|
|
@ -564,6 +564,9 @@ if get_option('tests')
|
|||
config_h.set_quoted('ADDR2LINE', addr2line.path())
|
||||
endif
|
||||
|
||||
leftover_rules = find_program('test/check-leftover-udev-rules.sh')
|
||||
test('leftover-rules', leftover_rules, is_parallel : false)
|
||||
|
||||
dep_libunwind = dependency('libunwind', required : false)
|
||||
config_h.set10('HAVE_LIBUNWIND', dep_libunwind.found())
|
||||
|
||||
|
|
|
|||
11
test/check-leftover-udev-rules.sh
Executable file
11
test/check-leftover-udev-rules.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
ls /run/udev/rules.d/*litest*.rules 2>/dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ls /etc/udev/hwdb.d/*litest*REMOVEME*.hwdb 2>/dev/null
|
||||
if [[ $? -eq 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -52,3 +52,15 @@
|
|||
fun:ioctl
|
||||
fun:libevdev_grab
|
||||
}
|
||||
{
|
||||
bash:execute_command
|
||||
Memcheck:Cond
|
||||
...
|
||||
fun:execute_command
|
||||
}
|
||||
{
|
||||
bash:execute_command
|
||||
Memcheck:Leak
|
||||
...
|
||||
fun:execute_command
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue