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