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
|
# tests: pytests
# SPDX-License-Identifier: GPL-3.0-or-later
# python 3 dependencies
py3_deps += [
['jinja2', 'jinja2 (for pytests)'],
['dns', 'dnspython (for pytests)'],
['pytest', 'pytest (for pytests)'],
['pytest_html', 'pytest-html (for pytests)'],
['xdist', 'pytest-xdist (for pytests)'],
]
if gnutls.version().version_compare('<3.6.4')
error('pytests require GnuTLS >= 3.6.4')
endif
# compile tlsproxy
tlsproxy_src = files([
'proxy/tlsproxy.c',
'proxy/tls-proxy.c',
])
tlsproxy = executable(
'tlsproxy',
tlsproxy_src,
dependencies: [
libkres_dep,
libuv,
gnutls,
],
)
# path to kresd and tlsproxy
pytests_env = environment()
pytests_env.prepend('PATH', sbin_dir, meson.current_build_dir())
test(
'pytests.parallel',
python3,
args: [
'-m', 'pytest',
'-d',
'--html', 'pytests.parallel.html',
'--self-contained-html',
'--junitxml=pytests.parallel.junit.xml',
'-n', '24',
'-v',
],
env: pytests_env,
suite: [
'postinstall',
'pytests',
],
workdir: meson.current_source_dir(),
is_parallel: false,
timeout: 180,
depends: tlsproxy,
)
test(
'pytests.single',
python3,
args: [
'-m', 'pytest',
'--junitxml=pytests.single.junit.xml',
'-ra',
'--capture=no',
'conn_flood.py',
],
env: pytests_env,
suite: [
'postinstall',
'pytests',
],
workdir: meson.current_source_dir(),
is_parallel: false,
timeout: 240,
)
|