Move integration tests into a subdirectory
authorKirill Isakov <bootctl@gmail.com>
Wed, 23 Mar 2022 06:49:09 +0000 (12:49 +0600)
committerKirill Isakov <bootctl@gmail.com>
Wed, 23 Mar 2022 11:32:18 +0000 (17:32 +0600)
20 files changed:
test/integration/algorithms.test [moved from test/algorithms.test with 100% similarity]
test/integration/basic.test [moved from test/basic.test with 100% similarity]
test/integration/command-fsck.test [moved from test/command-fsck.test with 100% similarity]
test/integration/commandline.test [moved from test/commandline.test with 100% similarity]
test/integration/compression.test [moved from test/compression.test with 100% similarity]
test/integration/executables.test [moved from test/executables.test with 100% similarity]
test/integration/import-export.test [moved from test/import-export.test with 100% similarity]
test/integration/invite-join.test [moved from test/invite-join.test with 100% similarity]
test/integration/invite-offline.test [moved from test/invite-offline.test with 100% similarity]
test/integration/invite-tinc-up.test [moved from test/invite-tinc-up.test with 100% similarity]
test/integration/legacy-protocol.test [moved from test/legacy-protocol.test with 100% similarity]
test/integration/meson.build [new file with mode: 0644]
test/integration/ns-ping.test [moved from test/ns-ping.test with 100% similarity]
test/integration/scripts.test [moved from test/scripts.test with 100% similarity]
test/integration/security.test [moved from test/security.test with 100% similarity]
test/integration/splice.c [moved from test/splice.c with 99% similarity]
test/integration/sptps-basic.test [moved from test/sptps-basic.test with 100% similarity]
test/integration/testlib.sh [moved from test/testlib.sh with 100% similarity]
test/integration/variables.test [moved from test/variables.test with 100% similarity]
test/meson.build

similarity index 100%
rename from test/basic.test
rename to test/integration/basic.test
diff --git a/test/integration/meson.build b/test/integration/meson.build
new file mode 100644 (file)
index 0000000..1c3b9ea
--- /dev/null
@@ -0,0 +1,64 @@
+tests = [
+  'basic.test',
+  'commandline.test',
+  'executables.test',
+  'import-export.test',
+  'invite-join.test',
+  'invite-offline.test',
+  'invite-tinc-up.test',
+  'scripts.test',
+  'security.test',
+  'variables.test',
+]
+
+if opt_crypto != 'nolegacy'
+  tests += 'algorithms.test'
+  tests += 'legacy-protocol.test'
+endif
+
+if os_name != 'windows'
+  tests += 'sptps-basic.test'
+endif
+
+if os_name == 'linux'
+  tests += 'ns-ping.test'
+endif
+
+exe_splice = executable(
+  'splice',
+  sources: 'splice.c',
+  dependencies: deps_common,
+  implicit_include_directories: false,
+  include_directories: inc_conf,
+  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')
+
+deps_test = [
+  exe_tinc,
+  exe_tincd,
+  exe_splice,
+  exe_sptps_test,
+  exe_sptps_keypair,
+]
+
+test_wd = meson.current_build_dir()
+
+foreach test_name : tests
+  target = find_program(test_name, native: true)
+  test(test_name,
+       target,
+       suite: 'integration',
+       timeout: 5 * 60,
+       env: env,
+       depends: deps_test,
+       workdir: test_wd)
+endforeach
+
similarity index 99%
rename from test/splice.c
rename to test/integration/splice.c
index 118d011..07c3503 100644 (file)
@@ -17,7 +17,7 @@
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
 
-#include "../src/system.h"
+#include "../../src/system.h"
 
 #ifdef HAVE_MINGW
 static const char *winerror(int err) {
similarity index 100%
rename from test/testlib.sh
rename to test/integration/testlib.sh
index 4b12f2e..db719a2 100644 (file)
@@ -1,63 +1,2 @@
-tests = [
-  'basic.test',
-  'commandline.test',
-  'executables.test',
-  'import-export.test',
-  'invite-join.test',
-  'invite-offline.test',
-  'invite-tinc-up.test',
-  'scripts.test',
-  'security.test',
-  'variables.test',
-]
-
-if opt_crypto != 'nolegacy'
-  tests += 'algorithms.test'
-  tests += 'legacy-protocol.test'
-endif
-
-if os_name != 'windows'
-  tests += 'sptps-basic.test'
-endif
-
-if os_name == 'linux'
-  tests += 'ns-ping.test'
-endif
-
-exe_splice = executable(
-  'splice',
-  sources: 'splice.c',
-  dependencies: deps_common,
-  implicit_include_directories: false,
-  include_directories: inc_conf,
-  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', src_root / 'test' / 'testlib.sh')
-
-deps_test = [
-  exe_tinc,
-  exe_tincd,
-  exe_splice,
-  exe_sptps_test,
-  exe_sptps_keypair,
-]
-
-test_wd = meson.current_build_dir()
-
-foreach test_name : tests
-  target = find_program(test_name, native: true)
-  test(test_name,
-       target,
-       timeout: 5 * 60,
-       env: env,
-       depends: deps_test,
-       workdir: test_wd)
-endforeach
+subdir('integration')