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