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