tests: Capture the test client log

Capture the test client log to a temporary fd, so that is accessible by both
the test server process and the test client process.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
This commit is contained in:
Alexandros Frantzis 2022-12-01 20:02:43 +02:00 committed by Simon Ser
parent 674145dc3f
commit d4d3228853
3 changed files with 104 additions and 2 deletions

View file

@ -43,6 +43,7 @@ struct client_info {
struct wl_list link;
void *data; /* for arbitrary use */
int log_fd;
};
struct display {
@ -106,6 +107,9 @@ void display_post_resume_events(struct display *d);
* it then reruns the display. */
void display_resume(struct display *d);
/* The file descriptor containing the client log. This is only valid in the
* test client processes. */
extern int client_log_fd;
struct client_info *client_create_with_name(struct display *d,
void (*client_main)(void *data),