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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
test_exe = executable(
'yasl-test',
'test_lifecycle.c',
include_directories: inc,
link_with: yasl_lib.get_static_lib(),
dependencies: deps,
)
add_test_setup('asan')
add_test_setup('tsan')
add_test_setup('msan')
test('basic', test_exe)
contracts_test = executable(
'yasl-contracts-test',
'common/test_contracts.c',
include_directories: inc,
dependencies: yasl_dep,
)
test('contracts', contracts_test)
timer_test = executable(
'yasl-timer-test',
'common/test_timers.c',
include_directories: inc,
dependencies: yasl_dep,
)
test('timers', timer_test)
input_alloc_test = executable(
'yasl-input-alloc-test',
['common/test_input_alloc.c', '../src/common/input.c'],
include_directories: inc,
c_args: ['-Dmalloc=yasl_test_malloc'],
)
test('input-allocation-failure', input_alloc_test)
selection_test = executable(
'yasl-selection-test',
'common/test_selection.c',
dependencies: yasl_dep,
)
test('selection', selection_test)
if has_wayland
ime_test = executable('yasl-ime-test', 'wayland/test_input.c',
include_directories: inc,
dependencies: yasl_dep,
)
test('ime-ownership', ime_test)
endif
if get_option('integration_tests')
if has_cocoa
native_test = executable('yasl-native-test', 'cocoa/test_native.c',
dependencies: yasl_dep,
)
test('native', native_test, timeout: 20)
ownership_test = executable('yasl-ownership-test', 'cocoa/test_ownership.m',
dependencies: yasl_dep,
)
test('native-ownership', ownership_test, timeout: 20)
else
if not has_wayland or not has_x11
error('Linux integration tests require Wayland and X11.')
endif
backend_test = executable(
'yasl-backend-test',
'common/test_backends.c',
dependencies: yasl_dep,
)
python = find_program('python3')
weston = find_program('weston')
xwayland = find_program('Xwayland')
test('backends', python,
args: [files('helpers/run_backends.py'), weston, xwayland, backend_test],
timeout: 60,
)
endif
endif
|