mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2025-12-28 07:20:07 +01:00
test: hack a peck_debug() function
To make it easier to print something debuggy from a test. This is the MVP, it always requires an argument after the format string but it'll do for now.
This commit is contained in:
parent
34c83370be
commit
fae41aac08
2 changed files with 12 additions and 0 deletions
|
|
@ -1358,6 +1358,15 @@ _peck_mark(struct peck *peck, const char *func, int line)
|
|||
log_debug(peck, "mark %3d: line %d in %s()\n", mark++, line, func);
|
||||
}
|
||||
|
||||
void _peck_debug(struct peck *peck, const char *func, int line, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
va_start(args, format);
|
||||
log_msg_va(peck->logger, LOGGER_DEBUG, "unused", line, func, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
MUNIT_GLOBAL_SETUP(init_sigalarm)
|
||||
{
|
||||
int argc = setup->argc;
|
||||
|
|
|
|||
|
|
@ -152,6 +152,9 @@ 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_debug(struct peck *peck, const char *func, int line, const char *format, ...);
|
||||
#define peck_debug(peck_, ...) _peck_debug(peck_, __func__, __LINE__, __VA_ARGS__)
|
||||
|
||||
void
|
||||
peck_enable_eis_behavior(struct peck *peck, enum peck_eis_behavior behavior);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue