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