4b12f2e9b308d5980b6e2235249585298d07c6eb
[tinc] / test / meson.build
1 tests = [
2   'basic.test',
3   'commandline.test',
4   'executables.test',
5   'import-export.test',
6   'invite-join.test',
7   'invite-offline.test',
8   'invite-tinc-up.test',
9   'scripts.test',
10   'security.test',
11   'variables.test',
12 ]
13
14 if opt_crypto != 'nolegacy'
15   tests += 'algorithms.test'
16   tests += 'legacy-protocol.test'
17 endif
18
19 if os_name != 'windows'
20   tests += 'sptps-basic.test'
21 endif
22
23 if os_name == 'linux'
24   tests += 'ns-ping.test'
25 endif
26
27 exe_splice = executable(
28   'splice',
29   sources: 'splice.c',
30   dependencies: deps_common,
31   implicit_include_directories: false,
32   include_directories: inc_conf,
33   build_by_default: false,
34 )
35
36 env = environment()
37 env.set('TINC_PATH', exe_tinc.full_path())
38 env.set('TINCD_PATH', exe_tincd.full_path())
39 env.set('SPTPS_TEST_PATH', exe_sptps_test.full_path())
40 env.set('SPTPS_KEYPAIR_PATH', exe_sptps_keypair.full_path())
41 env.set('SPLICE_PATH', exe_splice.full_path())
42 env.set('TESTLIB_PATH', src_root / 'test' / 'testlib.sh')
43
44 deps_test = [
45   exe_tinc,
46   exe_tincd,
47   exe_splice,
48   exe_sptps_test,
49   exe_sptps_keypair,
50 ]
51
52 test_wd = meson.current_build_dir()
53
54 foreach test_name : tests
55   target = find_program(test_name, native: true)
56   test(test_name,
57        target,
58        timeout: 5 * 60,
59        env: env,
60        depends: deps_test,
61        workdir: test_wd)
62 endforeach
63