cf09cac5c52badc003bf655e5b3368dc04860ad6
[tinc] / test / integration / meson.build
1 tests = [
2   'basic.py',
3   'command_fsck.py',
4   'commandline.py',
5   'executables.py',
6   'import_export.py',
7   'invite.py',
8   'invite_tinc_up.py',
9   'proxy.py',
10   'sandbox.py',
11   'scripts.py',
12   'security.py',
13   'splice.py',
14   'sptps_basic.py',
15   'variables.py',
16 ]
17
18 if opt_crypto != 'nolegacy'
19   tests += [
20     'algorithms.py',
21     'legacy_protocol.py',
22   ]
23 endif
24
25 if os_name == 'linux'
26   tests += [
27     'ns_ping.py',
28     'compression.py',
29   ]
30 endif
31
32 exe_splice = executable(
33   'splice',
34   sources: 'splice.c',
35   dependencies: deps_common,
36   implicit_include_directories: false,
37   include_directories: inc_conf,
38   build_by_default: false,
39 )
40
41 env_vars = {
42   'TINC_PATH': exe_tinc.full_path(),
43   'TINCD_PATH': exe_tincd.full_path(),
44   'PYTHON_PATH': python_path,
45   'SPLICE_PATH': exe_splice.full_path(),
46   'SPTPS_TEST_PATH': exe_sptps_test.full_path(),
47   'SPTPS_KEYPAIR_PATH': exe_sptps_keypair.full_path(),
48 }
49
50 deps_test = [
51   exe_tinc,
52   exe_tincd,
53   exe_splice,
54   exe_sptps_test,
55   exe_sptps_keypair,
56 ]
57
58 test_wd = meson.current_build_dir()
59 test_src = meson.current_source_dir()
60
61 foreach test_name : tests
62   if meson_version.version_compare('>=0.52')
63     env = environment(env_vars)
64   else
65     env = environment()
66     foreach k, v : env_vars
67       env.set(k, v)
68     endforeach
69   endif
70   env.set('TEST_NAME', test_name)
71
72   test(test_name,
73        python,
74        args: test_src / test_name,
75        suite: 'integration',
76        timeout: 60,
77        env: env,
78        depends: deps_test,
79        workdir: test_wd)
80 endforeach
81