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