Commit graph

7 commits

Author SHA1 Message Date
Peter Hutterer
9dbcc68621 test: auto-generate the udev rules
We only ever set properties in the devices, so let's make that more explicit
and auto-generate the udev rule. This way we're hopefully better protected
from the various typos that hid in those rules over the years, but also be
prepared for passing the udev property key/value pairs elsewhere.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-06-14 08:52:58 +10:00
Peter Hutterer
2346801b0e test: switch to a TEST_DEVICE macro for all the litest test devices
The test device initialization code was a bit of duplicated boilerplate and
required adding a reference to the devices to the 'devices' list in litest.c.
Automate this with a new TEST_DEVICE macro that adds the devices to a custom
section in the binary, then loops throught that section to get the device out.

This reduces the boilerplate for each test device to just the TEST_MACRO and
the LITEST_foo device enum entry. It also now automates the shortname of the
device.

The device's shortname was standardised in this approach as well, lowercase
and dashes only.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-09-21 15:06:17 +10:00
Peter Hutterer
9672e2f407 test: fix two test udev rules
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-30 13:36:20 +10:00
Peter Hutterer
5d2501aa7d Drop HAVE_CONFIG_H ifdef
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>
2016-12-01 11:06:54 +10:00
Peter Hutterer
b1fa57372c test: add missing comma to horizontal click angle udev rule
Without the comma it now assigns the horizontal click angle property to all
devices.

Introduced in b02acd346b

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-10-25 12:11:42 +10:00
Peter Hutterer
b02acd346b Read the horizontal wheel click angle property if available
The Logitech MX master has different click angles for the two wheels.

https://github.com/systemd/systemd/issues/3947

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2016-08-22 11:29:35 +10:00
Peter Hutterer
c914956211 test: add a device to check MOUSE_WHEEL_CLICK_ANGLE handling
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-11-09 16:06:26 +10:00