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