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
82
83
84
85
86
87
88
89
90
91
92
93
94
|
nice_tests = [
'test-pseudotcp',
# 'test-pseudotcp-fuzzy', FIXME: this test is not reliable, times out sometimes
'test-bsd',
'test',
'test-address',
'test-add-remove-stream',
'test-build-io-stream',
'test-io-stream-thread',
'test-io-stream-closing-write',
'test-io-stream-closing-read',
'test-io-stream-cancelling',
'test-io-stream-pollable',
'test-send-recv',
'test-socket-is-based-on',
'test-udp-turn-fragmentation',
'test-priority',
'test-fullmode',
'test-different-number-streams',
'test-restart',
'test-fallback',
'test-thread',
'test-trickle',
'test-tcp',
'test-icetcp',
'test-credentials',
'test-turn',
'test-drop-invalid',
'test-nomination',
]
if cc.has_header('arpa/inet.h')
nice_tests += [
'test-pseudotcp-fin',
'test-new-trickle',
]
endif
tenv = environment()
tenv.set('BUILT_WITH_MESON', '1')
foreach tname : nice_tests
if tname.startswith('test-io-stream') or tname.startswith('test-send-recv')
extra_src = ['test-io-stream-common.c']
else
extra_src = []
endif
exe = executable('nice-@0@'.format(tname),
'@0@.c'.format(tname), extra_src,
c_args: '-DG_LOG_DOMAIN="libnice-tests"',
include_directories: nice_incs,
dependencies: [nice_deps, libm],
link_with: [libagent, libstun, libsocket, librandom],
install: false)
set_variable(tname.underscorify(), exe)
test(tname, exe, env: tenv)
endforeach
if gst_dep.found()
gst_check = dependency('gstreamer-check-1.0', required: get_option('gstreamer'),
fallback : ['gstreamer', 'gst_check_dep'])
if gst_check.found()
exe = executable('nice-test-gstreamer',
'test-gstreamer.c', extra_src,
c_args: '-DG_LOG_DOMAIN="libnice-tests"',
include_directories: nice_incs,
dependencies: [nice_deps, gst_check, libm],
link_with: libnice,
install: false)
gst_env = tenv
gst_env.append('GST_PLUGIN_PATH_1_0', join_paths(meson.current_build_dir(), '..', 'gst'))
test('test-gstreamer', exe, env: gst_env)
endif
endif
if find_program('sh', required : false).found()
dd = find_program('dd', required : false)
diff = find_program('diff', required : false)
if dd.found() and diff.found()
test('test-pseudotcp-random', find_program('test-pseudotcp-random.sh'),
args: test_pseudotcp,
env: tenv)
endif
test('test-fullmode-with-stun', files('check-test-fullmode-with-stun.sh'),
args: [stund_exe, test_fullmode],
env: tenv,
is_parallel: false)
endif
debugenv = environment()
debugenv.set('G_MESSAGES_DEBUG', 'all')
debugenv.set('NICE_DEBUG', 'all')
add_test_setup('debug', env: debugenv)
|