X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fintegration%2Fmeson.build;h=5dc2430ae24a5fe121924b149e786c4ed3804170;hb=9a012e485a2ed5ea5a28903d93bc625767bb20b2;hp=b32ea82efc91fa2d22ea1157b305250066c74dfb;hpb=2ded4a80352dfbbd17b35ae0eafcbdc62243d574;p=tinc diff --git a/test/integration/meson.build b/test/integration/meson.build index b32ea82e..5dc2430a 100644 --- a/test/integration/meson.build +++ b/test/integration/meson.build @@ -1,32 +1,30 @@ tests = [ - 'basic.test', - 'commandline.test', - 'executables.test', - 'import-export.test', - 'invite-join.test', - 'invite-offline.test', - 'invite-tinc-up.test', - 'security.test', - 'security-legacy.test', - 'security-sptps.test', - 'variables.test', + 'basic.py', + 'command_fsck.py', + 'commandline.py', + 'executables.py', + 'import_export.py', + 'invite_tinc_up.py', + 'invite.py', + 'scripts.py', + 'security.py', + 'splice.py', + 'sptps_basic.py', + 'variables.py', ] if opt_crypto != 'nolegacy' - tests += 'algorithms.test' - tests += 'legacy-protocol.test' -endif - -if os_name != 'windows' - tests += 'sptps-basic.test' + tests += [ + 'algorithms.py', + 'legacy_protocol.py', + ] endif if os_name == 'linux' - tests += 'ns-ping.test' -endif - -if os_name != 'sunos' - tests += 'scripts.test' + tests += [ + 'ns_ping.py', + 'compression.py', + ] endif exe_splice = executable( @@ -38,13 +36,14 @@ exe_splice = executable( build_by_default: false, ) -env = environment() -env.set('TINC_PATH', exe_tinc.full_path()) -env.set('TINCD_PATH', exe_tincd.full_path()) -env.set('SPTPS_TEST_PATH', exe_sptps_test.full_path()) -env.set('SPTPS_KEYPAIR_PATH', exe_sptps_keypair.full_path()) -env.set('SPLICE_PATH', exe_splice.full_path()) -env.set('TESTLIB_PATH', meson.current_source_dir() / 'testlib.sh') +env_vars = { + 'TINC_PATH': exe_tinc.full_path(), + 'TINCD_PATH': exe_tincd.full_path(), + 'PYTHON_PATH': python_path, + 'SPLICE_PATH': exe_splice.full_path(), + 'SPTPS_TEST_PATH': exe_sptps_test.full_path(), + 'SPTPS_KEYPAIR_PATH': exe_sptps_keypair.full_path(), +} deps_test = [ exe_tinc, @@ -55,13 +54,24 @@ deps_test = [ ] test_wd = meson.current_build_dir() +test_src = meson.current_source_dir() foreach test_name : tests - target = find_program(test_name, native: true) + if meson_version.version_compare('>=0.52') + env = environment(env_vars) + else + env = environment() + foreach k, v : env_vars + env.set(k, v) + endforeach + endif + env.set('TEST_NAME', test_name) + test(test_name, - target, + python, + args: test_src / test_name, suite: 'integration', - timeout: 5 * 60, + timeout: 60, env: env, depends: deps_test, workdir: test_wd)