File: testlib-full-shell.h

package info (click to toggle)
phosh 0.51.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 9,620 kB
  • sloc: ansic: 81,727; xml: 3,903; python: 502; sh: 456; makefile: 34; lisp: 22; javascript: 6
file content (41 lines) | stat: -rw-r--r-- 1,509 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Copyright (C) 2020 Purism SPC
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Author: Guido Günther <agx@sigxcpu.org>
 */

#include "testlib.h"

G_BEGIN_DECLS

typedef struct _PhoshTestFullShellFixture {
  GThread                  *comp_and_shell;
  GAsyncQueue              *queue;
  PhoshTestCompositorState *state;
  GTestDBus                *bus;
  char                     *log_domains;
  char                     *tmpdir;
} PhoshTestFullShellFixture;


typedef struct _PhoshTestFullShellFixtureCfg {
  char *log_domains;
} PhoshTestFullShellFixtureCfg;


PhoshTestFullShellFixtureCfg *phosh_test_full_shell_fixture_cfg_new (const char *log_domains);
void phosh_test_full_shell_fixture_cfg_dispose (PhoshTestFullShellFixtureCfg *self);
void phosh_test_full_shell_setup (PhoshTestFullShellFixture *fixture, gconstpointer data);
void phosh_test_full_shell_teardown (PhoshTestFullShellFixture *fixture, gconstpointer unused);

#define PHOSH_FULL_SHELL_TEST_ADD(name, cfg, func) g_test_add ((name), \
                                                               PhoshTestFullShellFixture, (cfg), \
                                                          (gpointer)phosh_test_full_shell_setup, \
                                                          (gpointer)(func), \
                                                          (gpointer)phosh_test_full_shell_teardown)

G_DEFINE_AUTOPTR_CLEANUP_FUNC (PhoshTestFullShellFixtureCfg, phosh_test_full_shell_fixture_cfg_dispose)

G_END_DECLS