From 830407e88f9d40d954356c3754f2647f91d5c06a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:26:00 +0200 Subject: Adding upstream version 5.6.0. Signed-off-by: Daniel Baumann --- tests/pytests/meson.build | 77 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 tests/pytests/meson.build (limited to 'tests/pytests/meson.build') diff --git a/tests/pytests/meson.build b/tests/pytests/meson.build new file mode 100644 index 0000000..d717dc2 --- /dev/null +++ b/tests/pytests/meson.build @@ -0,0 +1,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, +) -- cgit v1.2.3