mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-03 18:30:12 +01:00
test: add a helper function to mark test progress
Makes debugging easier: just insert a few peck_mark() calls and see them correctly mixed into the output.
This commit is contained in:
parent
e9e67449d5
commit
81d6fb335d
2 changed files with 11 additions and 0 deletions
|
|
@ -1056,3 +1056,10 @@ peck_eis_event_type_name(enum eis_event_type type)
|
|||
#undef CASE_STRING
|
||||
assert(!"Unhandled EIS event type");
|
||||
}
|
||||
|
||||
void
|
||||
_peck_mark(struct peck *peck, const char *func, int line)
|
||||
{
|
||||
static uint32_t mark = 0;
|
||||
log_debug(peck, "mark %3d: line %d in %s()\n", mark++, line, func);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,6 +134,10 @@ struct peck;
|
|||
struct peck *
|
||||
peck_new(void);
|
||||
|
||||
void _peck_mark(struct peck *peck, const char *func, int line);
|
||||
/** Add debug marker to the log output */
|
||||
#define peck_mark(peck_) _peck_mark(peck_, __func__, __LINE__)
|
||||
|
||||
void
|
||||
peck_enable_eis_behavior(struct peck *peck, enum peck_eis_behavior behavior);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue