mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 13:30:27 +01:00
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>
This commit is contained in:
parent
5516e9ea74
commit
2346801b0e
71 changed files with 197 additions and 862 deletions
|
|
@ -631,17 +631,16 @@ if get_option('tests')
|
|||
def_no_main,
|
||||
def_disable_backtrace
|
||||
]
|
||||
test_litest_selftest_sources = [
|
||||
test_litest_selftest_sources = lib_litest_sources + [
|
||||
'test/litest-selftest.c',
|
||||
'test/litest.c',
|
||||
'test/litest-int.h',
|
||||
'test/litest.h'
|
||||
]
|
||||
deps_litest_selftest = [dep_litest]
|
||||
test_litest_selftest = executable('test-litest-selftest',
|
||||
test_litest_selftest_sources,
|
||||
include_directories : [includes_src, includes_include],
|
||||
dependencies : deps_litest_selftest,
|
||||
dependencies : deps_litest,
|
||||
c_args : defs_litest_selftest,
|
||||
install : false)
|
||||
test('test-litest-selftest', test_litest_selftest)
|
||||
|
|
@ -651,7 +650,7 @@ if get_option('tests')
|
|||
test_symbols_leak,
|
||||
args : [ meson.current_source_dir() ])
|
||||
|
||||
libinput_test_runner_sources = [
|
||||
libinput_test_runner_sources = lib_litest_sources + [
|
||||
'src/libinput-util.h',
|
||||
'src/libinput-util.c',
|
||||
'test/test-udev.c',
|
||||
|
|
@ -676,7 +675,7 @@ if get_option('tests')
|
|||
libinput_test_runner = executable('libinput-test-suite-runner',
|
||||
libinput_test_runner_sources,
|
||||
include_directories : [includes_src, includes_include],
|
||||
dependencies : dep_litest,
|
||||
dependencies : deps_litest,
|
||||
c_args : [ def_LT_VERSION ],
|
||||
install : false)
|
||||
test('libinput-test-suite-runner',
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_keyboard_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ACER_HAWAII_KEYBOARD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x4f2,
|
||||
|
|
@ -194,15 +188,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_acer_hawaii_keyboard_device = {
|
||||
TEST_DEVICE("hawaii-keyboard",
|
||||
.type = LITEST_ACER_HAWAII_KEYBOARD,
|
||||
.features = LITEST_KEYS,
|
||||
.shortname = "hawaii-keyboard",
|
||||
.setup = litest_keyboard_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Chicony ACER Hawaii Keyboard",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = NULL,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_touchpad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ACER_HAWAII_TOUCHPAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -98,11 +91,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_acer_hawaii_touchpad_device = {
|
||||
TEST_DEVICE("hawaii-touchpad",
|
||||
.type = LITEST_ACER_HAWAII_TOUCHPAD,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
|
||||
.shortname = "hawaii-touchpad",
|
||||
.setup = litest_touchpad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Chicony ACER Hawaii Keyboard Touchpad",
|
||||
|
|
@ -110,4 +101,4 @@ struct litest_test_device litest_acer_hawaii_touchpad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_alps_dualpoint_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ALPS_DUALPOINT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -120,11 +113,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_alps_dualpoint_device = {
|
||||
TEST_DEVICE("alps-dualpoint",
|
||||
.type = LITEST_ALPS_DUALPOINT,
|
||||
.features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SEMI_MT,
|
||||
.shortname = "alps dualpoint",
|
||||
.setup = litest_alps_dualpoint_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "AlpsPS/2 ALPS DualPoint TouchPad",
|
||||
|
|
@ -132,4 +123,4 @@ struct litest_test_device litest_alps_dualpoint_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_alps_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ALPS_SEMI_MT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -110,15 +103,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_alps_device = {
|
||||
TEST_DEVICE("alps-semi-mt",
|
||||
.type = LITEST_ALPS_SEMI_MT,
|
||||
.features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SEMI_MT,
|
||||
.shortname = "alps semi-mt",
|
||||
.setup = litest_alps_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "AlpsPS/2 ALPS GlidePoint",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,12 +30,6 @@
|
|||
* This is the keyboard device for this mouse.
|
||||
*/
|
||||
|
||||
static void litest_anker_mouse_kbd_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ANKER_MOUSE_KBD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x4d9,
|
||||
|
|
@ -209,15 +203,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 },
|
||||
};
|
||||
|
||||
struct litest_test_device litest_anker_mouse_kbd_device = {
|
||||
TEST_DEVICE("anker-kbd",
|
||||
.type = LITEST_ANKER_MOUSE_KBD,
|
||||
.features = LITEST_KEYS | LITEST_WHEEL,
|
||||
.shortname = "anker_kbd",
|
||||
.setup = litest_anker_mouse_kbd_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "USB Laser Game Mouse",
|
||||
.id = &input_id,
|
||||
.absinfo = absinfo,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_appletouch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_APPLETOUCH);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -100,11 +93,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_appletouch_device = {
|
||||
TEST_DEVICE("appletouch",
|
||||
.type = LITEST_APPLETOUCH,
|
||||
.features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SINGLE_TOUCH,
|
||||
.shortname = "appletouch",
|
||||
.setup = litest_appletouch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "appletouch",
|
||||
|
|
@ -112,4 +103,4 @@ struct litest_test_device litest_appletouch_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_apple_keyboard_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_APPLE_KEYBOARD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x5ac,
|
||||
|
|
@ -223,15 +217,13 @@ static int events[] = {
|
|||
-1, -1
|
||||
};
|
||||
|
||||
struct litest_test_device litest_apple_keyboard_device = {
|
||||
TEST_DEVICE("apple-keyboard",
|
||||
.type = LITEST_APPLE_KEYBOARD,
|
||||
.features = LITEST_KEYS,
|
||||
.shortname = "apple_keyboard",
|
||||
.setup = litest_apple_keyboard_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Apple Inc. Apple Internal Keyboard / Trackpad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = NULL,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_magicmouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MAGICMOUSE);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -106,11 +100,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"mouse_end\"";
|
||||
|
||||
struct litest_test_device litest_magicmouse_device = {
|
||||
TEST_DEVICE("litest-magicmouse-device",
|
||||
.type = LITEST_MAGICMOUSE,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "magicmouse",
|
||||
.setup = litest_magicmouse_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Apple Magic Mouse",
|
||||
|
|
@ -118,4 +110,4 @@ struct litest_test_device litest_magicmouse_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -29,12 +29,6 @@
|
|||
/* Note: this is the second event node of this mouse only, the first event
|
||||
* node is just a normal mouse */
|
||||
|
||||
static void litest_mouse_gladius_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE_GLADIUS);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x0b05,
|
||||
|
|
@ -318,15 +312,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_mouse_gladius_device = {
|
||||
TEST_DEVICE("mouse-gladius",
|
||||
.type = LITEST_MOUSE_GLADIUS,
|
||||
.features = LITEST_RELATIVE | LITEST_WHEEL | LITEST_KEYS,
|
||||
.shortname = "mouse_gladius",
|
||||
.setup = litest_mouse_gladius_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "ASUS ROG GLADIUS",
|
||||
.id = &input_id,
|
||||
.absinfo = absinfo,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_atmel_hover_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ATMEL_HOVER);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -128,15 +121,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_atmel_hover_device = {
|
||||
TEST_DEVICE("atmel-hover",
|
||||
.type = LITEST_ATMEL_HOVER,
|
||||
.features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_CLICKPAD | LITEST_HOVER,
|
||||
.shortname = "atmel hover",
|
||||
.setup = litest_atmel_hover_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Atmel maXTouch Touchpad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_bcm5974_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_BCM5974);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -121,16 +115,14 @@ static int events[] = {
|
|||
-1, -1
|
||||
};
|
||||
|
||||
struct litest_test_device litest_bcm5974_device = {
|
||||
TEST_DEVICE("bcm5974",
|
||||
.type = LITEST_BCM5974,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD |
|
||||
LITEST_BUTTON | LITEST_APPLE_CLICKPAD,
|
||||
.shortname = "bcm5974",
|
||||
.setup = litest_bcm5974_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "bcm5974",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_calibrated_touchscreen_setup(void)
|
||||
{
|
||||
struct litest_device *d =
|
||||
litest_create_device(LITEST_CALIBRATED_TOUCHSCREEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -87,11 +80,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"calibrated_touchscreen_end\"";
|
||||
|
||||
struct litest_test_device litest_calibrated_touchscreen_device = {
|
||||
TEST_DEVICE("calibrated-touchscreen",
|
||||
.type = LITEST_CALIBRATED_TOUCHSCREEN,
|
||||
.features = LITEST_TOUCH,
|
||||
.shortname = "calibrated-touchscreen",
|
||||
.setup = litest_calibrated_touchscreen_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Calibrated Touchscreen",
|
||||
|
|
@ -99,4 +90,4 @@ struct litest_test_device litest_calibrated_touchscreen_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_cyborg_rat_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_CYBORG_RAT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x6a3,
|
||||
|
|
@ -55,15 +49,13 @@ static int events[] = {
|
|||
-1 , -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_cyborg_rat_device = {
|
||||
TEST_DEVICE("cyborg-rat",
|
||||
.type = LITEST_CYBORG_RAT,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "cyborg_rat",
|
||||
.setup = litest_cyborg_rat_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Saitek Cyborg R.A.T.5 Mouse",
|
||||
.id = &input_id,
|
||||
.absinfo = NULL,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_elantech_touchpad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_ELANTECH_TOUCHPAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -105,15 +98,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_elantech_touchpad_device = {
|
||||
TEST_DEVICE("elantech",
|
||||
.type = LITEST_ELANTECH_TOUCHPAD,
|
||||
.features = LITEST_TOUCHPAD | LITEST_BUTTON,
|
||||
.shortname = "elantech",
|
||||
.setup = litest_elantech_touchpad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "ETPS/2 Elantech Touchpad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_generic_singletouch_touch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_GENERIC_SINGLETOUCH);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -72,15 +65,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_generic_singletouch_device = {
|
||||
TEST_DEVICE("generic-singletouch",
|
||||
.type = LITEST_GENERIC_SINGLETOUCH,
|
||||
.features = LITEST_SINGLE_TOUCH,
|
||||
.shortname = "generic-singletouch",
|
||||
.setup = litest_generic_singletouch_touch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "generic_singletouch",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_gpio_keys_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_GPIO_KEYS);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x19,
|
||||
.vendor = 0x1,
|
||||
|
|
@ -59,11 +52,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"switch_end\"";
|
||||
|
||||
struct litest_test_device litest_gpio_keys_device = {
|
||||
TEST_DEVICE("gpio-keys",
|
||||
.type = LITEST_GPIO_KEYS,
|
||||
.features = LITEST_SWITCH,
|
||||
.shortname = "gpio keys",
|
||||
.setup = litest_gpio_keys_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "gpio-keys",
|
||||
|
|
@ -72,4 +63,4 @@ struct litest_test_device litest_gpio_keys_device = {
|
|||
.absinfo = NULL,
|
||||
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_huion_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_HUION_TABLET);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -104,11 +98,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"huion_end\"";
|
||||
|
||||
struct litest_test_device litest_huion_tablet_device = {
|
||||
TEST_DEVICE("huion-tablet",
|
||||
.type = LITEST_HUION_TABLET,
|
||||
.features = LITEST_TABLET,
|
||||
.shortname = "huion-tablet",
|
||||
.setup = litest_huion_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "HUION PenTablet Pen",
|
||||
|
|
@ -116,4 +108,4 @@ struct litest_test_device litest_huion_tablet_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_IGNORED_MOUSE);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x17ef,
|
||||
|
|
@ -58,11 +52,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"mouse_end\"";
|
||||
|
||||
struct litest_test_device litest_ignored_mouse_device = {
|
||||
TEST_DEVICE("ignored-mouse",
|
||||
.type = LITEST_IGNORED_MOUSE,
|
||||
.features = LITEST_IGNORED | LITEST_BUTTON | LITEST_RELATIVE,
|
||||
.shortname = "ignored-mouse",
|
||||
.setup = litest_mouse_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Ignored Mouse",
|
||||
|
|
@ -70,4 +62,4 @@ struct litest_test_device litest_ignored_mouse_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,9 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void all_codes_create(struct litest_device *d);
|
||||
#define NAME "All event codes keyboard"
|
||||
|
||||
static void litest_keyboard_all_codes_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_KEYBOARD_ALL_CODES);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
static void all_codes_create(struct litest_device *d);
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x11,
|
||||
|
|
@ -40,19 +36,17 @@ static struct input_id input_id = {
|
|||
.product = 0x1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_keyboard_all_codes_device = {
|
||||
TEST_DEVICE("keyboard-all-codes",
|
||||
.type = LITEST_KEYBOARD_ALL_CODES,
|
||||
.features = LITEST_KEYS,
|
||||
.shortname = "keyboard all event codes",
|
||||
.setup = litest_keyboard_all_codes_setup,
|
||||
.interface = NULL,
|
||||
.create = all_codes_create,
|
||||
|
||||
.name = "All event codes keyboard",
|
||||
.name = NAME,
|
||||
.id = &input_id,
|
||||
.events = NULL,
|
||||
.absinfo = NULL,
|
||||
};
|
||||
)
|
||||
|
||||
static void
|
||||
all_codes_create(struct litest_device *d)
|
||||
|
|
@ -72,8 +66,8 @@ all_codes_create(struct litest_device *d)
|
|||
events[idx++] = -1;
|
||||
events[idx++] = -1;
|
||||
|
||||
d->uinput = litest_create_uinput_device_from_description(litest_keyboard_all_codes_device.name,
|
||||
litest_keyboard_all_codes_device.id,
|
||||
d->uinput = litest_create_uinput_device_from_description(NAME,
|
||||
&input_id,
|
||||
NULL,
|
||||
events);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,12 +32,6 @@
|
|||
* file.
|
||||
*/
|
||||
|
||||
static void litest_blackwidow_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_KEYBOARD_BLACKWIDOW);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1532,
|
||||
|
|
@ -335,15 +329,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 },
|
||||
};
|
||||
|
||||
struct litest_test_device litest_keyboard_blackwidow_device = {
|
||||
TEST_DEVICE("blackwidow",
|
||||
.type = LITEST_KEYBOARD_BLACKWIDOW,
|
||||
.features = LITEST_KEYS | LITEST_WHEEL,
|
||||
.shortname = "blackwidow",
|
||||
.setup = litest_blackwidow_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Razer Razer BlackWidow 2013",
|
||||
.id = &input_id,
|
||||
.absinfo = absinfo,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_keyboard_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_KEYBOARD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x11,
|
||||
.vendor = 0x1,
|
||||
|
|
@ -197,15 +191,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_keyboard_device = {
|
||||
TEST_DEVICE("default-keyboard",
|
||||
.type = LITEST_KEYBOARD,
|
||||
.features = LITEST_KEYS,
|
||||
.shortname = "default keyboard",
|
||||
.setup = litest_keyboard_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "AT Translated Set 2 keyboard",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = NULL,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,13 +27,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_lid_switch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_LID_SWITCH_SURFACE3);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x19,
|
||||
.vendor = 0x0,
|
||||
|
|
@ -55,11 +48,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"switch_end\"";
|
||||
|
||||
struct litest_test_device litest_lid_switch_surface3_device = {
|
||||
TEST_DEVICE("lid-switch-surface3",
|
||||
.type = LITEST_LID_SWITCH_SURFACE3,
|
||||
.features = LITEST_SWITCH,
|
||||
.shortname = "lid-switch-surface3",
|
||||
.setup = litest_lid_switch_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Lid Switch Surface3",
|
||||
|
|
@ -68,4 +59,4 @@ struct litest_test_device litest_lid_switch_surface3_device = {
|
|||
.absinfo = NULL,
|
||||
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_lid_switch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_LID_SWITCH);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x19,
|
||||
.vendor = 0x0,
|
||||
|
|
@ -54,11 +47,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"switch_end\"";
|
||||
|
||||
struct litest_test_device litest_lid_switch_device = {
|
||||
TEST_DEVICE("lid-switch",
|
||||
.type = LITEST_LID_SWITCH,
|
||||
.features = LITEST_SWITCH,
|
||||
.shortname = "lid switch",
|
||||
.setup = litest_lid_switch_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Lid Switch",
|
||||
|
|
@ -67,4 +58,4 @@ struct litest_test_device litest_lid_switch_device = {
|
|||
.absinfo = NULL,
|
||||
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_logitech_trackball_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_LOGITECH_TRACKBALL);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x46d,
|
||||
|
|
@ -49,15 +43,13 @@ static int events[] = {
|
|||
-1 , -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_logitech_trackball_device = {
|
||||
TEST_DEVICE("logitech-trackball",
|
||||
.type = LITEST_LOGITECH_TRACKBALL,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_TRACKBALL,
|
||||
.shortname = "logitech trackball",
|
||||
.setup = litest_logitech_trackball_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Logitech USB Trackball",
|
||||
.id = &input_id,
|
||||
.absinfo = NULL,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_magicpad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MAGIC_TRACKPAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -121,12 +115,10 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_magicpad_device = {
|
||||
TEST_DEVICE("magic-trackpad",
|
||||
.type = LITEST_MAGIC_TRACKPAD,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD |
|
||||
LITEST_BUTTON | LITEST_APPLE_CLICKPAD,
|
||||
.shortname = "magic trackpad",
|
||||
.setup = litest_magicpad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Apple Wireless Trackpad",
|
||||
|
|
@ -134,4 +126,4 @@ struct litest_test_device litest_magicpad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE_LOW_DPI);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1,
|
||||
|
|
@ -58,11 +52,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_mouse_low_dpi_device = {
|
||||
TEST_DEVICE("low-dpi-mouse",
|
||||
.type = LITEST_MOUSE_LOW_DPI,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "low-dpi mouse",
|
||||
.setup = litest_mouse_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Low DPI Mouse",
|
||||
|
|
@ -70,4 +62,4 @@ struct litest_test_device litest_mouse_low_dpi_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_roccat_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE_ROCCAT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1e7d,
|
||||
|
|
@ -190,15 +184,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_mouse_roccat_device = {
|
||||
TEST_DEVICE("mouse-roccat",
|
||||
.type = LITEST_MOUSE_ROCCAT,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL | LITEST_KEYS,
|
||||
.shortname = "mouse_roccat",
|
||||
.setup = litest_mouse_roccat_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "ROCCAT ROCCAT Kone XTD",
|
||||
.id = &input_id,
|
||||
.absinfo = absinfo,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE_WHEEL_CLICK_ANGLE);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1234,
|
||||
|
|
@ -58,11 +52,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"wheel_click_angle_end\"";
|
||||
|
||||
struct litest_test_device litest_mouse_wheel_click_angle_device = {
|
||||
TEST_DEVICE("mouse-wheelclickangle",
|
||||
.type = LITEST_MOUSE_WHEEL_CLICK_ANGLE,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "mouse-wheelclickangle",
|
||||
.setup = litest_mouse_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Wheel Click Angle Mouse",
|
||||
|
|
@ -70,4 +62,4 @@ struct litest_test_device litest_mouse_wheel_click_angle_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE_WHEEL_CLICK_COUNT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1234,
|
||||
|
|
@ -60,11 +54,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"wheel_click_count_end\"";
|
||||
|
||||
struct litest_test_device litest_mouse_wheel_click_count_device = {
|
||||
TEST_DEVICE("mouse-wheelclickcount",
|
||||
.type = LITEST_MOUSE_WHEEL_CLICK_COUNT,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "mouse-wheelclickcount",
|
||||
.setup = litest_mouse_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Wheel Click Count Mouse",
|
||||
|
|
@ -72,4 +64,4 @@ struct litest_test_device litest_mouse_wheel_click_count_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -28,12 +28,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE_WHEEL_TILT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x17ef,
|
||||
|
|
@ -61,11 +55,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"wheel_wheel_tilt_end\"";
|
||||
|
||||
struct litest_test_device litest_mouse_wheel_tilt_device = {
|
||||
TEST_DEVICE("mouse-wheel-tilt",
|
||||
.type = LITEST_MOUSE_WHEEL_TILT,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "mouse-wheel-tilt",
|
||||
.setup = litest_mouse_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Wheel Tilt Mouse",
|
||||
|
|
@ -73,4 +65,4 @@ struct litest_test_device litest_mouse_wheel_tilt_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_mouse_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MOUSE);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x17ef,
|
||||
|
|
@ -48,15 +42,13 @@ static int events[] = {
|
|||
-1 , -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_mouse_device = {
|
||||
TEST_DEVICE("mouse",
|
||||
.type = LITEST_MOUSE,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "mouse",
|
||||
.setup = litest_mouse_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Lenovo Optical USB Mouse",
|
||||
.id = &input_id,
|
||||
.absinfo = NULL,
|
||||
.events = events,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_ms_surface_cover_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_MS_SURFACE_COVER);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -374,15 +367,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_ms_surface_cover_device = {
|
||||
TEST_DEVICE("ms-surface-cover",
|
||||
.type = LITEST_MS_SURFACE_COVER,
|
||||
.features = LITEST_KEYS | LITEST_ABSOLUTE | LITEST_RELATIVE | LITEST_FAKE_MT | LITEST_BUTTON | LITEST_WHEEL,
|
||||
.shortname = "MS surface cover",
|
||||
.setup = litest_ms_surface_cover_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Microsoft Surface Type Cover",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_nexus4_setup(void)
|
||||
{
|
||||
struct litest_device *d =
|
||||
litest_create_device(LITEST_NEXUS4_TOUCH_SCREEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -83,15 +76,13 @@ static int events[] = {
|
|||
-1, -1
|
||||
};
|
||||
|
||||
struct litest_test_device litest_nexus4_device = {
|
||||
TEST_DEVICE("nexus4",
|
||||
.type = LITEST_NEXUS4_TOUCH_SCREEN,
|
||||
.features = LITEST_TOUCH|LITEST_ELLIPSE,
|
||||
.shortname = "nexus4",
|
||||
.setup = litest_nexus4_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Nexus 4 touch screen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_protocol_a_touch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_PROTOCOL_A_SCREEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -82,15 +75,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_protocol_a_screen = {
|
||||
TEST_DEVICE("protocol-a",
|
||||
.type = LITEST_PROTOCOL_A_SCREEN,
|
||||
.features = LITEST_PROTOCOL_A,
|
||||
.shortname = "protocol A",
|
||||
.setup = litest_protocol_a_touch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Protocol A touch screen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,13 +27,6 @@
|
|||
#include "litest-int.h"
|
||||
#include <assert.h>
|
||||
|
||||
static void
|
||||
litest_qemu_tablet_touch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_QEMU_TABLET);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static void touch_down(struct litest_device *d, unsigned int slot,
|
||||
double x, double y)
|
||||
{
|
||||
|
|
@ -86,15 +79,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_qemu_tablet_device = {
|
||||
TEST_DEVICE("qemu-tablet",
|
||||
.type = LITEST_QEMU_TABLET,
|
||||
.features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE,
|
||||
.shortname = "qemu tablet",
|
||||
.setup = litest_qemu_tablet_touch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "QEMU 0.12.1 QEMU USB Tablet",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -30,13 +30,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_hover_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_HOVER_SEMI_MT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -118,11 +111,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"synaptics_semi_mt_end\"";
|
||||
|
||||
struct litest_test_device litest_synaptics_hover_device = {
|
||||
TEST_DEVICE("synaptics-hover",
|
||||
.type = LITEST_SYNAPTICS_HOVER_SEMI_MT,
|
||||
.features = LITEST_TOUCHPAD | LITEST_SEMI_MT | LITEST_BUTTON,
|
||||
.shortname = "synaptics hover",
|
||||
.setup = litest_synaptics_hover_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "SynPS/2 Synaptics TouchPad",
|
||||
|
|
@ -130,4 +121,4 @@ struct litest_test_device litest_synaptics_hover_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_i2c_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_I2C);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -96,11 +89,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_synaptics_i2c_device = {
|
||||
TEST_DEVICE("synaptics-i2c",
|
||||
.type = LITEST_SYNAPTICS_I2C,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
|
||||
.shortname = "synaptics-i2c",
|
||||
.setup = litest_synaptics_i2c_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "DLL0704:01 06CB:76AD Touchpad",
|
||||
|
|
@ -108,4 +99,4 @@ struct litest_test_device litest_synaptics_i2c_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_rmi4_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_RMI4);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -118,15 +111,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_synaptics_rmi4_device = {
|
||||
TEST_DEVICE("synaptics-rmi4",
|
||||
.type = LITEST_SYNAPTICS_RMI4,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
|
||||
.shortname = "synaptics rmi4",
|
||||
.setup = litest_synaptics_rmi4_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Synaptics TM3053-004",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_touchpad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_TOUCHPAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -95,15 +88,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_synaptics_touchpad_device = {
|
||||
TEST_DEVICE("synaptics-st",
|
||||
.type = LITEST_SYNAPTICS_TOUCHPAD,
|
||||
.features = LITEST_TOUCHPAD | LITEST_BUTTON | LITEST_SINGLE_TOUCH,
|
||||
.shortname = "synaptics ST",
|
||||
.setup = litest_synaptics_touchpad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "SynPS/2 Synaptics TouchPad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_t440_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_TOPBUTTONPAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -110,15 +103,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_synaptics_t440_device = {
|
||||
TEST_DEVICE("synaptics-t440",
|
||||
.type = LITEST_SYNAPTICS_TOPBUTTONPAD,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON | LITEST_TOPBUTTONPAD,
|
||||
.shortname = "synaptics t440",
|
||||
.setup = litest_synaptics_t440_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "SynPS/2 Synaptics TouchPad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_carbon3rd_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_TRACKPOINT_BUTTONS);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -122,11 +115,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"touchpad_end\"";
|
||||
|
||||
struct litest_test_device litest_synaptics_carbon3rd_device = {
|
||||
TEST_DEVICE("synaptics-carbon3rd",
|
||||
.type = LITEST_SYNAPTICS_TRACKPOINT_BUTTONS,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
|
||||
.shortname = "synaptics carbon3rd",
|
||||
.setup = litest_synaptics_carbon3rd_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "SynPS/2 Synaptics TouchPad X1C3rd",
|
||||
|
|
@ -134,4 +125,4 @@ struct litest_test_device litest_synaptics_carbon3rd_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_synaptics_clickpad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_SYNAPTICS_CLICKPAD_X220);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -109,15 +102,13 @@ static struct input_absinfo absinfo[] = {
|
|||
{ .value = -1 }
|
||||
};
|
||||
|
||||
struct litest_test_device litest_synaptics_clickpad_device = {
|
||||
TEST_DEVICE("synaptics",
|
||||
.type = LITEST_SYNAPTICS_CLICKPAD_X220,
|
||||
.features = LITEST_TOUCHPAD | LITEST_CLICKPAD | LITEST_BUTTON,
|
||||
.shortname = "synaptics",
|
||||
.setup = litest_synaptics_clickpad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "SynPS/2 Synaptics TouchPad",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_extrabuttons_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_THINKPAD_EXTRABUTTONS);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x19,
|
||||
.vendor = 0x17aa,
|
||||
|
|
@ -76,15 +70,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_thinkpad_extrabuttons_device = {
|
||||
TEST_DEVICE("thinkpad-extrabuttons",
|
||||
.type = LITEST_THINKPAD_EXTRABUTTONS,
|
||||
.features = LITEST_KEYS | LITEST_SWITCH,
|
||||
.shortname = "thinkpad-extrabuttons",
|
||||
.setup = litest_extrabuttons_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "ThinkPad Extra Buttons",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = NULL,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_generic_mt_setup(void)
|
||||
{
|
||||
struct litest_device *d =
|
||||
litest_create_device(LITEST_GENERIC_MULTITOUCH_SCREEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -89,15 +82,13 @@ static int events[] = {
|
|||
-1, -1
|
||||
};
|
||||
|
||||
struct litest_test_device litest_generic_multitouch_screen_device = {
|
||||
TEST_DEVICE("generic-mt",
|
||||
.type = LITEST_GENERIC_MULTITOUCH_SCREEN,
|
||||
.features = LITEST_TOUCH|LITEST_ELLIPSE,
|
||||
.shortname = "generic-mt",
|
||||
.setup = litest_generic_mt_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "generic-mt",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_fuzz_mt_setup(void)
|
||||
{
|
||||
struct litest_device *d =
|
||||
litest_create_device(LITEST_MULTITOUCH_FUZZ_SCREEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_MT_SLOT, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_MT_TRACKING_ID, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -80,15 +73,13 @@ static int events[] = {
|
|||
-1, -1
|
||||
};
|
||||
|
||||
struct litest_test_device litest_multitouch_fuzz_screen_device = {
|
||||
TEST_DEVICE("touchscreen-fuzz",
|
||||
.type = LITEST_MULTITOUCH_FUZZ_SCREEN,
|
||||
.features = LITEST_TOUCH,
|
||||
.shortname = "touchscreen-fuzz",
|
||||
.setup = litest_fuzz_mt_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "touchscreen with fuzz",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_trackpoint_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_TRACKPOINT);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x11,
|
||||
.vendor = 0x2,
|
||||
|
|
@ -49,11 +43,9 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_trackpoint_device = {
|
||||
TEST_DEVICE("trackpoint",
|
||||
.type = LITEST_TRACKPOINT,
|
||||
.features = LITEST_RELATIVE | LITEST_BUTTON | LITEST_POINTINGSTICK,
|
||||
.shortname = "trackpoint",
|
||||
.setup = litest_trackpoint_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "TPPS/2 IBM TrackPoint",
|
||||
|
|
@ -61,4 +53,4 @@ struct litest_test_device litest_trackpoint_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_uclogic_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_UCLOGIC_TABLET);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -92,15 +86,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_uclogic_tablet_device = {
|
||||
TEST_DEVICE("uclogic-tablet",
|
||||
.type = LITEST_UCLOGIC_TABLET,
|
||||
.features = LITEST_TABLET,
|
||||
.shortname = "uclogic-tablet",
|
||||
.setup = litest_uclogic_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "uclogic PenTablet Pen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,13 +27,6 @@
|
|||
#include "litest-int.h"
|
||||
#include <assert.h>
|
||||
|
||||
static void
|
||||
litest_vmware_virtmouse_touch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_VMWARE_VIRTMOUSE);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static void touch_down(struct litest_device *d, unsigned int slot,
|
||||
double x, double y)
|
||||
{
|
||||
|
|
@ -100,15 +93,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_vmware_virtmouse_device = {
|
||||
TEST_DEVICE("vmware-virtmouse",
|
||||
.type = LITEST_VMWARE_VIRTMOUSE,
|
||||
.features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE,
|
||||
.shortname = "vmware virtmouse",
|
||||
.setup = litest_vmware_virtmouse_touch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "VMware VMware Virtual USB Mouse",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_bamboo_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_BAMBOO);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -104,15 +98,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_wacom_bamboo_tablet_device = {
|
||||
TEST_DEVICE("wacom-bamboo-tablet",
|
||||
.type = LITEST_WACOM_BAMBOO,
|
||||
.features = LITEST_TABLET | LITEST_DISTANCE,
|
||||
.shortname = "wacom-bamboo-tablet",
|
||||
.setup = litest_wacom_bamboo_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Bamboo 16FG 4x5 Pen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_cintiq_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_CINTIQ);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -143,15 +137,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_wacom_cintiq_tablet_device = {
|
||||
TEST_DEVICE("wacom-cintiq-tablet",
|
||||
.type = LITEST_WACOM_CINTIQ,
|
||||
.features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT,
|
||||
.shortname = "wacom-cintiq-tablet",
|
||||
.setup = litest_wacom_cintiq_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Cintiq 12WX",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_cintiq_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_CINTIQ_13HDT_FINGER);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -96,11 +90,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"rule_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_cintiq_13hdt_finger_device = {
|
||||
TEST_DEVICE("wacom-cintiq-13hdt-finger",
|
||||
.type = LITEST_WACOM_CINTIQ_13HDT_FINGER,
|
||||
.features = LITEST_TOUCH,
|
||||
.shortname = "wacom-cintiq-13hdt-finger",
|
||||
.setup = litest_wacom_cintiq_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Cintiq 13 HD touch Finger",
|
||||
|
|
@ -108,4 +100,4 @@ struct litest_test_device litest_wacom_cintiq_13hdt_finger_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_cintiq_pad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_CINTIQ_13HDT_PAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
|
@ -106,11 +100,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"pad_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_cintiq_13hdt_pad_device = {
|
||||
TEST_DEVICE("wacom-cintiq-13hdt-pad",
|
||||
.type = LITEST_WACOM_CINTIQ_13HDT_PAD,
|
||||
.features = LITEST_TABLET_PAD | LITEST_RING,
|
||||
.shortname = "wacom-cintiq-13hdt-pad",
|
||||
.setup = litest_wacom_cintiq_pad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Cintiq 13 HD touch Pad",
|
||||
|
|
@ -118,4 +110,4 @@ struct litest_test_device litest_wacom_cintiq_13hdt_pad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_cintiq_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_CINTIQ_13HDT_PEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -141,11 +135,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"rule_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_cintiq_13hdt_pen_device = {
|
||||
TEST_DEVICE("wacom-cintiq-13hdt-pen-tablet",
|
||||
.type = LITEST_WACOM_CINTIQ_13HDT_PEN,
|
||||
.features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT,
|
||||
.shortname = "wacom-cintiq-13hdt-pen-tablet",
|
||||
.setup = litest_wacom_cintiq_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Cintiq 13 HD touch Pen",
|
||||
|
|
@ -153,4 +145,4 @@ struct litest_test_device litest_wacom_cintiq_13hdt_pen_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_cintiq_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_CINTIQ_24HD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -132,15 +126,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_wacom_cintiq_24hd_device = {
|
||||
TEST_DEVICE("wacom-cintiq-24hd-tablet",
|
||||
.type = LITEST_WACOM_CINTIQ_24HD,
|
||||
.features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT,
|
||||
.shortname = "wacom-cintiq-24hd-tablet",
|
||||
.setup = litest_wacom_cintiq_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Cintiq 24 HD Pen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -31,15 +31,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_cintiq_pad_setup(void)
|
||||
{
|
||||
struct litest_device *d;
|
||||
|
||||
d = litest_create_device(LITEST_WACOM_CINTIQ_24HDT_PAD);
|
||||
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static void
|
||||
litest_wacom_cintiq_pad_teardown(void)
|
||||
{
|
||||
|
|
@ -131,11 +122,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"pad_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_cintiq_24hdt_pad_device = {
|
||||
TEST_DEVICE("wacom-cintiq-24hdt-pad",
|
||||
.type = LITEST_WACOM_CINTIQ_24HDT_PAD,
|
||||
.features = LITEST_TABLET_PAD | LITEST_RING,
|
||||
.shortname = "wacom-cintiq-24hdt-pad",
|
||||
.setup = litest_wacom_cintiq_pad_setup,
|
||||
.teardown = litest_wacom_cintiq_pad_teardown,
|
||||
.interface = &interface,
|
||||
|
||||
|
|
@ -144,4 +133,4 @@ struct litest_test_device litest_wacom_cintiq_24hdt_pad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_wacom_ekr_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_EKR);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
|
@ -116,11 +109,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"pad_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_ekr_device = {
|
||||
TEST_DEVICE("wacom-ekr",
|
||||
.type = LITEST_WACOM_EKR,
|
||||
.features = LITEST_TABLET_PAD | LITEST_RING,
|
||||
.shortname = "wacom-ekr",
|
||||
.setup = litest_wacom_ekr_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Express Key Remote Pad",
|
||||
|
|
@ -128,4 +119,4 @@ struct litest_test_device litest_wacom_ekr_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_hid4800_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_HID4800_PEN);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -104,15 +98,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_wacom_hid4800_tablet_device = {
|
||||
TEST_DEVICE("wacom-hid4800-tablet",
|
||||
.type = LITEST_WACOM_HID4800_PEN,
|
||||
.features = LITEST_TABLET,
|
||||
.shortname = "wacom-hid4800-tablet",
|
||||
.setup = litest_wacom_hid4800_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom HID 4800 Pen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_wacom_intuos3_pad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_INTUOS3_PAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
|
@ -101,11 +94,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"pad_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_intuos3_pad_device = {
|
||||
TEST_DEVICE("wacom-intuos3-pad",
|
||||
.type = LITEST_WACOM_INTUOS3_PAD,
|
||||
.features = LITEST_TABLET_PAD | LITEST_STRIP,
|
||||
.shortname = "wacom-intuos3-pad",
|
||||
.setup = litest_wacom_intuos3_pad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Intuos3 4x6 Pad",
|
||||
|
|
@ -113,4 +104,4 @@ struct litest_test_device litest_wacom_intuos3_pad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_wacom_finger_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_FINGER);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -97,11 +90,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"rule_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_finger_device = {
|
||||
TEST_DEVICE("wacom-finger",
|
||||
.type = LITEST_WACOM_FINGER,
|
||||
.features = LITEST_TOUCHPAD,
|
||||
.shortname = "wacom-finger",
|
||||
.setup = litest_wacom_finger_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Intuos5 touch M Finger",
|
||||
|
|
@ -109,4 +100,4 @@ struct litest_test_device litest_wacom_finger_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_wacom_intuos5_pad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_INTUOS5_PAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
|
@ -107,11 +100,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"pad_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_intuos5_pad_device = {
|
||||
TEST_DEVICE("wacom-pad",
|
||||
.type = LITEST_WACOM_INTUOS5_PAD,
|
||||
.features = LITEST_TABLET_PAD | LITEST_RING,
|
||||
.shortname = "wacom-pad",
|
||||
.setup = litest_wacom_intuos5_pad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Intuos5 touch M Pad",
|
||||
|
|
@ -119,4 +110,4 @@ struct litest_test_device litest_wacom_intuos5_pad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_intuos_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_INTUOS);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -157,11 +151,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"rule_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_intuos_tablet_device = {
|
||||
TEST_DEVICE("wacom-intuos-tablet",
|
||||
.type = LITEST_WACOM_INTUOS,
|
||||
.features = LITEST_TABLET | LITEST_DISTANCE | LITEST_TOOL_SERIAL | LITEST_TILT,
|
||||
.shortname = "wacom-intuos-tablet",
|
||||
.setup = litest_wacom_intuos_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom Intuos5 touch M Pen",
|
||||
|
|
@ -169,4 +161,4 @@ struct litest_test_device litest_wacom_intuos_tablet_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void
|
||||
litest_wacom_touch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_TOUCH);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -83,15 +76,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_wacom_touch_device = {
|
||||
TEST_DEVICE("wacom-touch",
|
||||
.type = LITEST_WACOM_TOUCH,
|
||||
.features = LITEST_TOUCH,
|
||||
.shortname = "wacom-touch",
|
||||
.setup = litest_wacom_touch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom ISDv4 E6 Finger",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_isdv4_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_ISDV4);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -97,15 +91,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_wacom_isdv4_tablet_device = {
|
||||
TEST_DEVICE("wacom-isdv4-tablet",
|
||||
.type = LITEST_WACOM_ISDV4,
|
||||
.features = LITEST_TABLET,
|
||||
.shortname = "wacom-isdv4-tablet",
|
||||
.setup = litest_wacom_isdv4_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom ISDv4 E6 Pen",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wacom_mobilestudio_pad_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event down[] = {
|
||||
{ .type = -1, .code = -1 },
|
||||
};
|
||||
|
|
@ -111,11 +105,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"pad_end\"";
|
||||
|
||||
struct litest_test_device litest_wacom_mobilestudio_13hdt_pad_device = {
|
||||
TEST_DEVICE("wacom-mobilestudio-pro16-pad",
|
||||
.type = LITEST_WACOM_MOBILESTUDIO_PRO_16_PAD,
|
||||
.features = LITEST_TABLET_PAD | LITEST_RING,
|
||||
.shortname = "wacom-mobilestudio-pro16-pad",
|
||||
.setup = litest_wacom_mobilestudio_pad_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Wacom MobileStudio Pro 16 Pad",
|
||||
|
|
@ -123,4 +115,4 @@ struct litest_test_device litest_wacom_mobilestudio_13hdt_pad_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_waltop_tablet_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WALTOP);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_event proximity_in[] = {
|
||||
{ .type = EV_ABS, .code = ABS_X, .value = LITEST_AUTO_ASSIGN },
|
||||
{ .type = EV_ABS, .code = ABS_Y, .value = LITEST_AUTO_ASSIGN },
|
||||
|
|
@ -236,11 +230,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"waltop_end\"";
|
||||
|
||||
struct litest_test_device litest_waltop_tablet_device = {
|
||||
TEST_DEVICE("waltop-tablet",
|
||||
.type = LITEST_WALTOP,
|
||||
.features = LITEST_TABLET | LITEST_WHEEL | LITEST_TILT,
|
||||
.shortname = "waltop-tablet",
|
||||
.setup = litest_waltop_tablet_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = " WALTOP Batteryless Tablet ", /* sic */
|
||||
|
|
@ -248,4 +240,4 @@ struct litest_test_device litest_waltop_tablet_device = {
|
|||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_wheel_only_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_WHEEL_ONLY);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1,
|
||||
|
|
@ -52,11 +46,9 @@ static const char udev_rule[] =
|
|||
"\n"
|
||||
"LABEL=\"wheel_only_end\"";
|
||||
|
||||
struct litest_test_device litest_wheel_only_device = {
|
||||
TEST_DEVICE("wheel-only",
|
||||
.type = LITEST_WHEEL_ONLY,
|
||||
.features = LITEST_WHEEL,
|
||||
.shortname = "wheel only",
|
||||
.setup = litest_wheel_only_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "wheel only device",
|
||||
|
|
@ -64,4 +56,4 @@ struct litest_test_device litest_wheel_only_device = {
|
|||
.absinfo = NULL,
|
||||
.events = events,
|
||||
.udev_rule = udev_rule,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,13 +27,6 @@
|
|||
#include "litest-int.h"
|
||||
#include <assert.h>
|
||||
|
||||
static void
|
||||
litest_xen_virtual_pointer_touch_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_XEN_VIRTUAL_POINTER);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static void touch_down(struct litest_device *d, unsigned int slot,
|
||||
double x, double y)
|
||||
{
|
||||
|
|
@ -91,15 +84,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_xen_virtual_pointer_device = {
|
||||
TEST_DEVICE("xen-pointer",
|
||||
.type = LITEST_XEN_VIRTUAL_POINTER,
|
||||
.features = LITEST_WHEEL | LITEST_BUTTON | LITEST_ABSOLUTE,
|
||||
.shortname = "xen pointer",
|
||||
.setup = litest_xen_virtual_pointer_touch_setup,
|
||||
.interface = &interface,
|
||||
|
||||
.name = "Xen Virtual Pointer",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = absinfo,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
|
|
@ -26,12 +26,6 @@
|
|||
#include "litest.h"
|
||||
#include "litest-int.h"
|
||||
|
||||
static void litest_yubikey_setup(void)
|
||||
{
|
||||
struct litest_device *d = litest_create_device(LITEST_YUBIKEY);
|
||||
litest_set_current_device(d);
|
||||
}
|
||||
|
||||
static struct input_id input_id = {
|
||||
.bustype = 0x3,
|
||||
.vendor = 0x1050,
|
||||
|
|
@ -153,15 +147,13 @@ static int events[] = {
|
|||
-1, -1,
|
||||
};
|
||||
|
||||
struct litest_test_device litest_yubikey_device = {
|
||||
TEST_DEVICE("yubikey",
|
||||
.type = LITEST_YUBIKEY,
|
||||
.features = LITEST_KEYS,
|
||||
.shortname = "yubikey",
|
||||
.setup = litest_yubikey_setup,
|
||||
.interface = NULL,
|
||||
|
||||
.name = "Yubico Yubico Yubikey II",
|
||||
.id = &input_id,
|
||||
.events = events,
|
||||
.absinfo = NULL,
|
||||
};
|
||||
)
|
||||
|
|
|
|||
168
test/litest.c
168
test/litest.c
|
|
@ -351,146 +351,7 @@ void litest_generic_device_teardown(void)
|
|||
current_device = NULL;
|
||||
}
|
||||
|
||||
extern struct litest_test_device litest_keyboard_device;
|
||||
extern struct litest_test_device litest_synaptics_clickpad_device;
|
||||
extern struct litest_test_device litest_synaptics_touchpad_device;
|
||||
extern struct litest_test_device litest_synaptics_t440_device;
|
||||
extern struct litest_test_device litest_trackpoint_device;
|
||||
extern struct litest_test_device litest_bcm5974_device;
|
||||
extern struct litest_test_device litest_mouse_device;
|
||||
extern struct litest_test_device litest_wacom_touch_device;
|
||||
extern struct litest_test_device litest_wacom_bamboo_tablet_device;
|
||||
extern struct litest_test_device litest_wacom_cintiq_tablet_device;
|
||||
extern struct litest_test_device litest_wacom_intuos_tablet_device;
|
||||
extern struct litest_test_device litest_wacom_isdv4_tablet_device;
|
||||
extern struct litest_test_device litest_alps_device;
|
||||
extern struct litest_test_device litest_generic_singletouch_device;
|
||||
extern struct litest_test_device litest_qemu_tablet_device;
|
||||
extern struct litest_test_device litest_xen_virtual_pointer_device;
|
||||
extern struct litest_test_device litest_vmware_virtmouse_device;
|
||||
extern struct litest_test_device litest_synaptics_hover_device;
|
||||
extern struct litest_test_device litest_synaptics_carbon3rd_device;
|
||||
extern struct litest_test_device litest_protocol_a_screen;
|
||||
extern struct litest_test_device litest_wacom_finger_device;
|
||||
extern struct litest_test_device litest_keyboard_blackwidow_device;
|
||||
extern struct litest_test_device litest_wheel_only_device;
|
||||
extern struct litest_test_device litest_mouse_roccat_device;
|
||||
extern struct litest_test_device litest_ms_surface_cover_device;
|
||||
extern struct litest_test_device litest_logitech_trackball_device;
|
||||
extern struct litest_test_device litest_atmel_hover_device;
|
||||
extern struct litest_test_device litest_alps_dualpoint_device;
|
||||
extern struct litest_test_device litest_mouse_low_dpi_device;
|
||||
extern struct litest_test_device litest_generic_multitouch_screen_device;
|
||||
extern struct litest_test_device litest_nexus4_device;
|
||||
extern struct litest_test_device litest_magicpad_device;
|
||||
extern struct litest_test_device litest_elantech_touchpad_device;
|
||||
extern struct litest_test_device litest_mouse_gladius_device;
|
||||
extern struct litest_test_device litest_mouse_wheel_click_angle_device;
|
||||
extern struct litest_test_device litest_apple_keyboard_device;
|
||||
extern struct litest_test_device litest_anker_mouse_kbd_device;
|
||||
extern struct litest_test_device litest_waltop_tablet_device;
|
||||
extern struct litest_test_device litest_huion_tablet_device;
|
||||
extern struct litest_test_device litest_cyborg_rat_device;
|
||||
extern struct litest_test_device litest_yubikey_device;
|
||||
extern struct litest_test_device litest_synaptics_i2c_device;
|
||||
extern struct litest_test_device litest_wacom_cintiq_24hd_device;
|
||||
extern struct litest_test_device litest_multitouch_fuzz_screen_device;
|
||||
extern struct litest_test_device litest_wacom_intuos3_pad_device;
|
||||
extern struct litest_test_device litest_wacom_intuos5_pad_device;
|
||||
extern struct litest_test_device litest_keyboard_all_codes_device;
|
||||
extern struct litest_test_device litest_magicmouse_device;
|
||||
extern struct litest_test_device litest_wacom_ekr_device;
|
||||
extern struct litest_test_device litest_wacom_cintiq_24hdt_pad_device;
|
||||
extern struct litest_test_device litest_wacom_cintiq_13hdt_finger_device;
|
||||
extern struct litest_test_device litest_wacom_cintiq_13hdt_pen_device;
|
||||
extern struct litest_test_device litest_wacom_cintiq_13hdt_pad_device;
|
||||
extern struct litest_test_device litest_wacom_hid4800_tablet_device;
|
||||
extern struct litest_test_device litest_mouse_wheel_click_count_device;
|
||||
extern struct litest_test_device litest_calibrated_touchscreen_device;
|
||||
extern struct litest_test_device litest_acer_hawaii_keyboard_device;
|
||||
extern struct litest_test_device litest_acer_hawaii_touchpad_device;
|
||||
extern struct litest_test_device litest_synaptics_rmi4_device;
|
||||
extern struct litest_test_device litest_mouse_wheel_tilt_device;
|
||||
extern struct litest_test_device litest_lid_switch_device;
|
||||
extern struct litest_test_device litest_lid_switch_surface3_device;
|
||||
extern struct litest_test_device litest_appletouch_device;
|
||||
extern struct litest_test_device litest_gpio_keys_device;
|
||||
extern struct litest_test_device litest_ignored_mouse_device;
|
||||
extern struct litest_test_device litest_wacom_mobilestudio_13hdt_pad_device;
|
||||
extern struct litest_test_device litest_thinkpad_extrabuttons_device;
|
||||
extern struct litest_test_device litest_uclogic_tablet_device;
|
||||
|
||||
struct litest_test_device* devices[] = {
|
||||
&litest_synaptics_clickpad_device,
|
||||
&litest_synaptics_touchpad_device,
|
||||
&litest_synaptics_t440_device,
|
||||
&litest_keyboard_device,
|
||||
&litest_trackpoint_device,
|
||||
&litest_bcm5974_device,
|
||||
&litest_mouse_device,
|
||||
&litest_wacom_touch_device,
|
||||
&litest_wacom_bamboo_tablet_device,
|
||||
&litest_wacom_cintiq_tablet_device,
|
||||
&litest_wacom_intuos_tablet_device,
|
||||
&litest_wacom_isdv4_tablet_device,
|
||||
&litest_alps_device,
|
||||
&litest_generic_singletouch_device,
|
||||
&litest_qemu_tablet_device,
|
||||
&litest_xen_virtual_pointer_device,
|
||||
&litest_vmware_virtmouse_device,
|
||||
&litest_synaptics_hover_device,
|
||||
&litest_synaptics_carbon3rd_device,
|
||||
&litest_protocol_a_screen,
|
||||
&litest_wacom_finger_device,
|
||||
&litest_keyboard_blackwidow_device,
|
||||
&litest_wheel_only_device,
|
||||
&litest_mouse_roccat_device,
|
||||
&litest_ms_surface_cover_device,
|
||||
&litest_logitech_trackball_device,
|
||||
&litest_atmel_hover_device,
|
||||
&litest_alps_dualpoint_device,
|
||||
&litest_mouse_low_dpi_device,
|
||||
&litest_generic_multitouch_screen_device,
|
||||
&litest_nexus4_device,
|
||||
&litest_magicpad_device,
|
||||
&litest_elantech_touchpad_device,
|
||||
&litest_mouse_gladius_device,
|
||||
&litest_mouse_wheel_click_angle_device,
|
||||
&litest_apple_keyboard_device,
|
||||
&litest_anker_mouse_kbd_device,
|
||||
&litest_waltop_tablet_device,
|
||||
&litest_huion_tablet_device,
|
||||
&litest_cyborg_rat_device,
|
||||
&litest_yubikey_device,
|
||||
&litest_synaptics_i2c_device,
|
||||
&litest_wacom_cintiq_24hd_device,
|
||||
&litest_multitouch_fuzz_screen_device,
|
||||
&litest_wacom_intuos3_pad_device,
|
||||
&litest_wacom_intuos5_pad_device,
|
||||
&litest_keyboard_all_codes_device,
|
||||
&litest_magicmouse_device,
|
||||
&litest_wacom_ekr_device,
|
||||
&litest_wacom_cintiq_24hdt_pad_device,
|
||||
&litest_wacom_cintiq_13hdt_finger_device,
|
||||
&litest_wacom_cintiq_13hdt_pen_device,
|
||||
&litest_wacom_cintiq_13hdt_pad_device,
|
||||
&litest_wacom_hid4800_tablet_device,
|
||||
&litest_mouse_wheel_click_count_device,
|
||||
&litest_calibrated_touchscreen_device,
|
||||
&litest_acer_hawaii_keyboard_device,
|
||||
&litest_acer_hawaii_touchpad_device,
|
||||
&litest_synaptics_rmi4_device,
|
||||
&litest_mouse_wheel_tilt_device,
|
||||
&litest_lid_switch_device,
|
||||
&litest_lid_switch_surface3_device,
|
||||
&litest_appletouch_device,
|
||||
&litest_gpio_keys_device,
|
||||
&litest_ignored_mouse_device,
|
||||
&litest_wacom_mobilestudio_13hdt_pad_device,
|
||||
&litest_thinkpad_extrabuttons_device,
|
||||
&litest_uclogic_tablet_device,
|
||||
NULL,
|
||||
};
|
||||
struct litest_test_device** devices;
|
||||
|
||||
static struct list all_tests;
|
||||
|
||||
|
|
@ -3663,12 +3524,39 @@ litest_list_tests(struct list *tests)
|
|||
}
|
||||
}
|
||||
|
||||
extern const struct test_device __start_test_section, __stop_test_section;
|
||||
|
||||
static void
|
||||
litest_init_test_devices(void)
|
||||
{
|
||||
const struct test_device *t;
|
||||
size_t ndevices = 0;
|
||||
|
||||
for (ndevices = 1,
|
||||
t = &__start_test_section;
|
||||
t < &__stop_test_section;
|
||||
ndevices++, t++)
|
||||
; /* loopdeeloop */
|
||||
|
||||
ndevices++;
|
||||
devices = zalloc(ndevices * sizeof(*devices));
|
||||
|
||||
for (ndevices = 0,
|
||||
t = &__start_test_section;
|
||||
t < &__stop_test_section;
|
||||
t++, ndevices++) {
|
||||
devices[ndevices] = t->device;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
const struct rlimit corelimit = { 0, 0 };
|
||||
enum litest_mode mode;
|
||||
|
||||
litest_init_test_devices();
|
||||
|
||||
list_init(&all_tests);
|
||||
|
||||
setenv("CK_DEFAULT_TIMEOUT", "30", 0);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,30 @@
|
|||
|
||||
#include "libinput-util.h"
|
||||
|
||||
struct test_device {
|
||||
const char *name;
|
||||
struct litest_test_device *device;
|
||||
} __attribute__((aligned(16)));
|
||||
|
||||
#define TEST_DEVICE(name, ...) \
|
||||
static struct litest_test_device _device; \
|
||||
\
|
||||
static void _setup(void) { \
|
||||
struct litest_device *d = litest_create_device(_device.type); \
|
||||
litest_set_current_device(d); \
|
||||
} \
|
||||
\
|
||||
static const struct test_device _test_device \
|
||||
__attribute__ ((used)) \
|
||||
__attribute__ ((section ("test_section"))) = { \
|
||||
name, &_device \
|
||||
}; \
|
||||
static struct litest_test_device _device = { \
|
||||
.setup = _setup, \
|
||||
.shortname = name, \
|
||||
__VA_ARGS__ \
|
||||
};
|
||||
|
||||
extern void litest_setup_tests_udev(void);
|
||||
extern void litest_setup_tests_path(void);
|
||||
extern void litest_setup_tests_pointer(void);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue