Commit graph

5 commits

Author SHA1 Message Date
Peter Hutterer
56dfa2f6c0 test: fix tool option parsing tests for signals
Not sure how this ever worked correctly: a process terminated by a signal has
the negative signo as return code. This would apply to every debug-events and
debug-gui test because they have to get killed by a signal. This failed
occasionally, presumably a race with the GTK startup/signal handler/whatever.

Fix this by a) sending SIGQUIT because that won't get handled by the tools and
b) prending that if we get a -SIGQUIT exit code, everything is fine.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-28 15:47:31 +10:00
Peter Hutterer
79293ea456 tools: fix the tool option parse test to handle unittest arguments
Pass arguments we don't handle directly through to the unittest module. This
way we can filter tests with -k testname etc.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-28 15:47:31 +10:00
Peter Hutterer
d7282a3d9d tools: skip the option parsing test during valgrind
We don't want to valgrind through python...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-03-12 15:10:15 +10:00
Peter Hutterer
4e469291b1 tools: let debug-events take a device path
This is the most common use-case other than "all from udev", so let's just
parse a device path correctly without requiring --device.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00
Peter Hutterer
5cd27b070e tools: add a test for tool option parsing
We don't check for correctness in the output as such, just that whatever
combination of cmdline arguments still works/doesn't work. This is the
scaffolding and a few tests, but needs to be filled in, especially for
libinput measure and for some more complex combinations.

valgrind: requires one more python-related suppression
gitlab-ci: requires another environment variable so we know to skip the
	   --device tests (udev will time out on those)
meson: skip the test run in release builds, we pass the full path to the built
       libinput tool but rely on the subtool lookup that won't work in a
       release build

Fixes #174

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-11-07 05:03:52 +00:00