Fix building tinc and running tests on Solaris
[tinc] / test / integration / 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   'security.test',
10   'variables.test',
11 ]
12
13 if opt_crypto != 'nolegacy'
14   tests += 'algorithms.test'
15   tests += 'legacy-protocol.test'
16 endif
17
18 if os_name != 'windows'
19   tests += 'sptps-basic.test'
20 endif
21
22 if os_name == 'linux'
23   tests += 'ns-ping.test'
24 endif
25
26 if os_name != 'sunos'
27   tests += 'scripts.test'
28 endif
29
30 exe_splice = executable(
31   'splice',
32   sources: 'splice.c',
33   dependencies: deps_common,
34   implicit_include_directories: false,
35   include_directories: inc_conf,
36   build_by_default: false,
37 )
38
39 env = environment()
40 env.set('TINC_PATH', exe_tinc.full_path())
41 env.set('TINCD_PATH', exe_tincd.full_path())
42 env.set('SPTPS_TEST_PATH', exe_sptps_test.full_path())
43 env.set('SPTPS_KEYPAIR_PATH', exe_sptps_keypair.full_path())
44 env.set('SPLICE_PATH', exe_splice.full_path())
45 env.set('TESTLIB_PATH', meson.current_source_dir() / 'testlib.sh')
46
47 deps_test = [
48   exe_tinc,
49   exe_tincd,
50   exe_splice,
51   exe_sptps_test,
52   exe_sptps_keypair,
53 ]
54
55 test_wd = meson.current_build_dir()
56
57 foreach test_name : tests
58   target = find_program(test_name, native: true)
59   test(test_name,
60        target,
61        suite: 'integration',
62        timeout: 5 * 60,
63        env: env,
64        depends: deps_test,
65        workdir: test_wd)
66 endforeach
67