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