summaryrefslogtreecommitdiff
path: root/test/litest-int.h
Commit message (Collapse)AuthorAgeFilesLines
* test: switch the global device list to a struct listPeter Hutterer2018-06-251-0/+2
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: fix indentation in litest-int.hPeter Hutterer2018-06-251-25/+25
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* test: install per-test device quirks filesPeter Hutterer2018-06-081-0/+1
| | | | | | These will replace the custom udev rules we currently have in place. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Drop HAVE_CONFIG_H ifdefPeter Hutterer2016-12-011-2/+0
| | | | | | | | We have one. Yay. Lucky us. Go forth and celebrate. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
* test: tablet pad testsPeter Hutterer2016-04-181-0/+16
| | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Carlos Garnacho <carlosg@gnome.org>
* Merge branch 'master' into tablet-supportPeter Hutterer2015-08-261-2/+2
|\
| * test: add a commentPeter Hutterer2015-08-121-2/+2
| | | | | | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* | Merge branch 'master' into tablet-supportPeter Hutterer2015-07-141-0/+6
|\ \ | |/
| * test: allow for a default value on LITEST_AUTO_ASSIGNSPeter Hutterer2015-07-091-0/+6
| | | | | | | | | | | | | | | | | | | | The touchpads currently all send a default value of 30 for ABS_PRESSURE. For some tests we want to have a custom pressure but changing all tests isn't sensible. So hook each device up to send a default value of 30 if it isn't overridden in the test itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* | Merge branch 'master' into tablet-supportPeter Hutterer2015-06-221-16/+17
|\ \ | |/
| * COPYING: Update boilerplate from MIT X11 to MIT Expat licensePeter Hutterer2015-06-161-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To quote Bryce Harrington from [1]: "MIT has released software under several slightly different licenses, including the old 'X11 License' or 'MIT License'. Some code under this license was in fact included in X.org's Xserver in the past. However, X.org now prefers the MIT Expat License as the standard (which, confusingly, is also referred to as the 'MIT License'). See http://cgit.freedesktop.org/xorg/xserver/tree/COPYING When Wayland started, it was Kristian Høgsberg's intent to license it compatibly with X.org. "I wanted Wayland to be usable (license-wise) whereever X was usable." But, the text of the older X11 License was taken for Wayland, rather than X11's current standard. This patch corrects this by swapping in the intended text." libinput is a fork of weston and thus inherited the original license intent and the license boilerplate itself. See this thread on wayland-devel here for a discussion: http://lists.freedesktop.org/archives/wayland-devel/2015-May/022301.html [1] http://lists.freedesktop.org/archives/wayland-devel/2015-June/022552.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com> Acked-by: Jonas Ådahl <jadahl@gmail.com>
* | Merge branch 'master' into tablet-supportPeter Hutterer2015-02-101-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Added: udev-tag detection for the tablet. libwacom assigns ID_INPUT_TABLET to all known devices but also ID_INPUT_TOUCHPAD to all known devices with a touch interface. That's a bug and should be fixed there but we can work around it by checking both and making sure only one is set. Conflicts: src/evdev.c test/misc.c
| * test: add per-device udev rule supportPeter Hutterer2015-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't rely on a magic version tag, instead let a device define a udev rule and drop that into the udev runtime directory before the device is created. There are a couple of caveats with this approach: first, since this changes system-wide state it may cause issues on the device the test suite is run on. This can be avoided if the udev rules have filter patterns that ensure only test devices are affected. Second, the check test suite aborts but it doesn't run the teardown() function if a test fails. So far this wasn't a problem since uinput devices disappear whenever we exit. The rules files will hang around though, so an unchecked fixture was added to delete all litest-foo.rules files before and after a test case starts. Unchecked fixtures are run regardless of the exit status of the test but run in the same address space - i.e. no ck_assert() usage. Also unchecked fixtures are only run once per test-case, not once per test function. For us, that means they're only run once per device (we use the devices as test case), i.e. if a test fails and the udev rule isn't tidied up, the next test may be unpredictable. This shouldn't matter too much though. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* | Merge branch 'master' into tablet-supportPeter Hutterer2014-09-221-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | sendevents config tests currently disabled for LITEST_TABLET until that gains the matching bits in the dispatch. Conflicts: src/evdev.c src/libinput.c test/litest.c test/litest.h
| * test: add a semi-mt Alps test devicePeter Hutterer2014-08-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Provides the bounding box only, with slot 0 always being the upper/left, slot 1 being the lower-right touch. This needs to use the touch_down etc. litest interfaces, which are now widened to double (leftover from 489630f58) and a device-specific private pointer in the litest device. New device feature for litest: LITEST_SEMI_MT Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* | Merge branch 'master' into tablet-supportPeter Hutterer2014-07-211-1/+1
|\ \ | |/
| * test: widen litest to use doubles for scaled variablesPeter Hutterer2014-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a 0-100% range is useful but in some cases we need events with finer than 1% granularity. And fix up the two-finger test that now fails. This was a bug in the test anyway, the dx/dy supplied here was 1% of the touchpad width. Confined to integers this meant we only ever had the touch down, then the single move by 1%. That caused two events - not enough to satisfy tp_estimate_delta, so we always had a delta of 0/0 regardless of the size of the move. Now with doubles this fails, so drop it to 0.1% instead, which is small enough on all touchpads we currently have. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* | test: Add infrastructure for testing tablet events.Carlos Garnacho2014-06-171-0/+8
|/ | | | | | | | | no vfuncs are used, only input_event arrays. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Stephen Chandler Paul <thatslyude@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* test: allow for description-based test devicesPeter Hutterer2014-04-081-1/+46
| | | | | | | | | | | Most of the test devices now are static descriptions anyway, make them fully static now, including for touch events. Switch the synaptics device now as example, the rest comes later for easier patch review. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
* test: add framework for a single-touch synaptics devicePeter Hutterer2014-03-251-0/+1
| | | | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
* Add a device test suitePeter Hutterer2014-01-151-0/+53
A rather large commit, copied from a similar (almost identical) suite in libtouchpad and ported for libinput. The goal here is to make testing for various devices easy, so the litest ("libinput test") wrappers do that. The idea is that each device has some features, and tests are likely to exercise some features or won't work with other features. Each test case takes a list of required features and a list of excluded features. The test suite will create a new test case for each device in the suite that matches that set. For example, the set of required LITEST_TOUCHPAD, excluded LITEST_BUTTON would run on clickpads only, not on touchpads with buttons. check supports suites and test cases, both named. We wrap that so that each named set of cases we add are a test suite, with the set of devices being the test cases. i.e. litest_add("foo:bar", some_test_function, LITEST_ANY, LITEST_ANY); adds a suite named "foo:bar" and test cases for both devices given, with their shortnames as test case name, resulting in: "foo:bar", "trackpoint" "foo:bar", "clickpad" ... Multiple test functions can be added to a suite. For tests without a device requirement there is litest_add_no_device_test(...). The environment variables CK_RUN_SUITE and CK_RUN_CASE can be used to narrow the set of test cases. The test suite detects when run inside a debugger and disables fork mode (the default). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>