option('client', type : 'boolean', value : true, description: 'kresc client binary')
option('daemon', type: 'boolean', value: true, description: 'kresd daemon binary')
option('doc', type: 'boolean', value: false, description: 'html documentation')
+option('extra_tests', type: 'boolean', value: false, description: 'integration tests with extra dependencies')
option('modules_dir', type: 'string', description: 'path to kres modules directory')
option('keyfile_default', type: 'string', description: 'path to trust anchors file')
-prepare_deckard = find_program('../../scripts/test-integration-prepare.sh')
+if get_option('extra_tests')
+ prepare_deckard = find_program('../../scripts/test-integration-prepare.sh')
-deckard_contrib = custom_target(
- 'deckard_contrib',
- command: [
- prepare_deckard,
- '@0@'.format(join_paths(meson.current_source_dir())),
- ],
- output: 'deckard_contrib',
- build_always_stale: true,
-)
+ # deckard dependencies
+ cmake = find_program('cmake') # for libswrapper
-deckard_env = environment()
-deckard_env.prepend('PATH', kresd_install_path)
+ deckard_contrib = custom_target(
+ 'deckard_contrib',
+ command: [
+ prepare_deckard,
+ '@0@'.format(join_paths(meson.current_source_dir())),
+ ],
+ output: 'deckard_contrib',
+ build_always_stale: true,
+ )
-deckard_kresd_run = find_program('deckard/kresd_run.sh')
-test(
- 'integration.deckard',
- deckard_kresd_run,
- env: deckard_env,
- suite: [
- 'postinstall',
- 'integration',
- ],
- is_parallel: false,
- timeout: 180, # TODO
- #workdir: join_paths(meson.current_source_dir(), 'deckard'),
- depends: deckard_contrib,
- build_by_default: false,
-)
+ deckard_env = environment()
+ deckard_env.prepend('PATH', kresd_install_path)
+
+ deckard_kresd_run = find_program('deckard/kresd_run.sh')
+ test(
+ 'integration.deckard',
+ deckard_kresd_run,
+ env: deckard_env,
+ suite: [
+ 'postinstall',
+ 'integration',
+ ],
+ is_parallel: false,
+ timeout: 180, # TODO
+ #workdir: join_paths(meson.current_source_dir(), 'deckard'),
+ depends: deckard_contrib,
+ build_by_default: false,
+ )
+endif
'proxy/tls-proxy.c',
]
+# compile tlsproxy
+# TODO fix or silence compilation warnings
tlsproxy = executable(
'tlsproxy',
tlsproxy_src,
libuv,
gnutls,
],
- build_by_default: false,
)
+# pytests dependencies
+pytest = find_program('pytest')
-pytest = find_program('pytest', required: false)
+# python 3 dependencies
+pytest_py3_deps = [
+ ['jinja2', 'jinja2'],
+ ['dnspython', 'dns'],
+ ['pytest-html', 'pytest_html'],
+ ['pytest-xdist', 'xdist'],
+]
+foreach py3_dep : pytest_py3_deps
+ py3_import = run_command(python3, '-c', 'import @0@'.format(py3_dep[1]))
+ if py3_import.returncode() != 0
+ error('missing pytests dependency: python3 @0@'.format(py3_dep[0]))
+ endif
+endforeach
pytests_env = environment()
pytests_env.prepend('PATH', kresd_install_path)