mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-25 02:20:06 +01:00
test: expose the ei socket fd to tests
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/337>
This commit is contained in:
parent
98e445ebdb
commit
8cd2b01bfa
2 changed files with 6 additions and 0 deletions
|
|
@ -61,6 +61,7 @@ struct peck_log_capture {
|
|||
struct peck {
|
||||
struct object object;
|
||||
struct ei *ei;
|
||||
int ei_fd;
|
||||
struct eis *eis;
|
||||
uint32_t eis_behavior;
|
||||
uint32_t ei_behavior;
|
||||
|
|
@ -223,6 +224,7 @@ OBJECT_IMPLEMENT_CREATE(peck);
|
|||
OBJECT_IMPLEMENT_UNREF(peck);
|
||||
OBJECT_IMPLEMENT_GETTER(peck, ei, struct ei*);
|
||||
OBJECT_IMPLEMENT_GETTER(peck, eis, struct eis*);
|
||||
OBJECT_IMPLEMENT_GETTER(peck, ei_fd, int);
|
||||
|
||||
void
|
||||
peck_drop_ei(struct peck *peck)
|
||||
|
|
@ -605,6 +607,7 @@ new_context(enum peck_ei_mode ei_mode)
|
|||
rc = ei_setup_backend_fd(ei, fd);
|
||||
munit_assert_int(rc, ==, 0);
|
||||
peck->ei = ei;
|
||||
peck->ei_fd = fd;
|
||||
peck_enable_ei_behavior(peck, PECK_EI_BEHAVIOR_HANDLE_CONNECT);
|
||||
peck_enable_ei_behavior(peck, PECK_EI_BEHAVIOR_AUTOSEAT);
|
||||
peck_enable_ei_behavior(peck, PECK_EI_BEHAVIOR_AUTOSTART);
|
||||
|
|
|
|||
|
|
@ -207,6 +207,9 @@ peck_eis_get_log_capture(struct peck *peck,
|
|||
struct ei *
|
||||
peck_get_ei(struct peck *peck);
|
||||
|
||||
int
|
||||
peck_get_ei_fd(struct peck *peck);
|
||||
|
||||
void
|
||||
peck_drop_ei(struct peck *peck);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue