summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools: fix typo in debug-eventsRonan Pigott2019-08-131-1/+1
|
* tests: increase the timeout for the subprocess to receive the quit signalBenjamin Tissoires2019-08-071-1/+1
| | | | | | | | | | | On a very loaded machine, the process might not receive the quit signal in a timely manner, and this introduce false positive results. Add a longer timeout. This shouldn't interfere with the global time spent in the tests, but will allow some loaded environment to pass the tests. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
* tools: record: fix two memory leaksPeter Hutterer2019-08-011-1/+4
| | | | | | Found by coverity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: record: fix segfault on exitPeter Hutterer2019-08-011-1/+2
| | | | | | If we don't supply --with-libinput, the device is NULL so we can't unref it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: record: when running from the builddir, load the quirks correctlyPeter Hutterer2019-07-241-0/+8
| | | | | | Fixes #324 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: handle arguments correctly for the YAML verifier toolPeter Hutterer2019-07-241-3/+4
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: skip the event tests for eventless recordings in the YAML verifierPeter Hutterer2019-07-241-0/+12
| | | | | | | When verifying a recording, let's skip those tests that require events but don't have any. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Fixed a grammar errorpixl2019-07-051-1/+1
|
* tools: return 77 if gtk_init() fails in the debug-guiPeter Hutterer2019-06-262-14/+26
| | | | | | | And when that happens, skip the tests because what's happening here is that you're running tests as root, but your X server doesn't allow root to connect. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: skip debug-gui option testing if the debug-gui is disabledPeter Hutterer2019-06-261-0/+5
| | | | | | Fixes #311 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: improve the error messages for measure touch-size/touchpad-pressurePeter Hutterer2019-06-242-4/+6
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: describe the various debug-gui features in the man pagePeter Hutterer2019-06-131-0/+48
| | | | | | | There are too many things now to make it immediately obvious, let's describe all this accordingly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: handle pad strip/ring events in the debug-guiPeter Hutterer2019-06-131-8/+103
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: display tablet and tablet pad buttons when pressedPeter Hutterer2019-06-131-0/+35
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tablet: add a the Totem tool type to the tablet interfacePeter Hutterer2019-06-072-0/+44
| | | | | | | | | | | | | | | | This is the public API only, not the internal bits, so nothing will work just yet. This interface addition is for the Dell Canvas Totem tool, so let's go with the same name because options like "Rotary" are too ambiguous. The totem is a knob that can be placed on the surface, it provides us with location and rotation data. The touch major/minor fields are filled in by the current totem, but they're always the same size. The totem exports BTN_0 as well, so let's add that to the debug-events output. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: add --apply-to to debug-events and debug-guiPeter Hutterer2019-05-274-10/+39
| | | | | | | | | | All configuration options will only apply to the device with the given match mattern. This makes it easier to test things like tapping on one device but not on the other. Exception is the sendevents pattern which applies independently. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: drop the valgrind check in the option-parsing testPeter Hutterer2019-05-071-3/+0
| | | | | | It's not part of the valgrind test suite, so we don't need this check anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: we don't need a core file for failed option parser testsPeter Hutterer2019-05-071-1/+6
| | | | | | | SIGQUIT which we send to any successful test of libinput debug-event will trigger a coredump. We don't need that one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: fix waiting for the tool to quit in the options testPeter Hutterer2019-04-091-4/+6
| | | | | | | | Just use the wait() timeout directly instead of sleep and kill. This allows us to have a longer timeout and still get fast handling where the tool immediately exits, but less failure when running on busy machines. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: use American spelling for 'unrecognized'Peter Hutterer2019-04-081-17/+17
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: switch measure-touchpad-tap to python-libevdevPeter Hutterer2019-04-011-24/+15
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: switch measure-touchpad-pressure to python-libevdevPeter Hutterer2019-04-011-37/+29
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: switch measure-touch-size to python-libevdevPeter Hutterer2019-04-011-31/+22
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: switch measure-fuzz to use python-libevdevPeter Hutterer2019-04-011-31/+11
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: record: increase value size to 6 digitsPeter Hutterer2019-04-011-2/+2
| | | | | | | Tablets commonly have higher axis ranges, might as well make sure they line up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: fix tool option parsing tests for signalsPeter Hutterer2019-03-281-1/+3
| | | | | | | | | | | | 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>
* tools: fix the tool option parse test to handle unittest argumentsPeter Hutterer2019-03-281-5/+6
| | | | | | | 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>
* Fix three coverity complaintsPeter Hutterer2019-03-251-1/+1
| | | | | | Two resource leaks, one uninitialized variable. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: flake8 fixes, typo fixes and missing exception handlingPeter Hutterer2019-03-151-10/+11
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: move the builddir lookup function out to a separate filePeter Hutterer2019-03-145-131/+12
| | | | | | | | | We want to use this from the tests as well soon, so let's move it to a more generic location. This also changes the API to be slightly more sensible, a free() is the same cost (and safer) than passing a static buffer in and hoping we didn't get the size wrong. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: skip the option parsing test during valgrindPeter Hutterer2019-03-121-0/+3
| | | | | | We don't want to valgrind through python... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: display the discrete axis steps tooPeter Hutterer2019-03-042-2/+54
| | | | | | | | | | | Draw a second smaller scroll bar that moves with every discrete step. For that to work, we have to accumulate the value from the normal scroll events until we get the first discrete one, then move up. The value per discrete event changes depending on the click wheel angle, so we can't just use discrete on its own if we want the two scroll bars aligned. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: group the scroll bits into a structPeter Hutterer2019-03-041-12/+14
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: record: print a helpful error message when we don't have devicesPeter Hutterer2019-03-041-2/+15
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: debug-gui: change the tablet colorPeter Hutterer2019-02-141-2/+2
| | | | | | Grey isn't pretty enough Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: debug-gui: add a previously unbalanced cairo_restore()Peter Hutterer2019-02-141-13/+6
| | | | | | And remove some of the unnecessary ones Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: debug-gui: move the pointer delta code to draw_pointerPeter Hutterer2019-02-141-22/+25
| | | | | | Not sure why this was in draw_tablet(), probably copy/paste Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: draw the tablet before the touch pointsPeter Hutterer2019-02-131-1/+1
| | | | | | | On the Dell Canvas Totem, the tool will cancel existing touch points and to visually debug that, we need the touchpoints to be drawn over the tool. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: draw other buttons in the debug-guiPeter Hutterer2019-02-131-0/+42
| | | | | | | | Buttons that aren't lmr are drawn in a separate button square now with the name as it comes from the kernel. This only handles one button at a time, but it'll do for debugging. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: debug-gui: move the lmr button handling into a substructPeter Hutterer2019-02-131-9/+12
| | | | | | No functional changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: debug-gui: show cancelled touches as unfilled circlesPeter Hutterer2019-02-131-10/+27
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: document show-keycodes option for libinput-recordPeter Hutterer2019-01-171-0/+4
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: libinput-record: record the hid report descriptor where availablePeter Hutterer2019-01-023-0/+60
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: measure-fuzz: slightly expand the helpPeter Hutterer2019-01-021-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: measure-fuzz: fix a typoPeter Hutterer2019-01-021-1/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: measure-fuzz: downgrade the fuzz mismatch error to just a warningPeter Hutterer2019-01-021-2/+2
| | | | | | Related to #199 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: measure-fuzz: fix exception printingPeter Hutterer2019-01-021-1/+1
| | | | | | | | | | | | | During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/x86_64-linux-gnu/libinput/libinput-measure-fuzz", line 464, in <module> main(sys.argv) File "/usr/lib/x86_64-linux-gnu/libinput/libinput-measure-fuzz", line 458, in main print('Error: {}'.format(e.message)) AttributeError: 'InvalidConfigurationError' object has no attribute 'message' Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>:
* tools: don't apply config options on device removedPeter Hutterer2018-12-192-4/+5
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: draw evdev events in the debug-guiPeter Hutterer2018-11-071-5/+296
| | | | | | | | | Listen to the pure evdev events from each device and print them. This makes it slightly easier to associate certain jumps with the output, or otherwise see that events are coming in even when libinput doesn't seem to process them anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* tools: let debug-events take a device pathPeter Hutterer2018-11-076-11/+35
| | | | | | | 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>