summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build
new file mode 100644
index 0000000..389658f
--- /dev/null
+++ b/tests/meson.build
@@ -0,0 +1,59 @@
+test_programs = [
+ ['test-utils', executable(
+ 'test-utils',
+ 'test-utils.c',
+ '../utils.c',
+ '../utils.h',
+ dependencies : [selinux_dep],
+ )],
+]
+
+test_scripts = [
+ 'test-run.sh',
+ 'test-seccomp.py',
+ 'test-specifying-pidns.sh',
+ 'test-specifying-userns.sh',
+]
+
+test_env = environment()
+test_env.set('BWRAP', bwrap.full_path())
+test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
+
+foreach pair : test_programs
+ name = pair[0]
+ test_program = pair[1]
+ if meson.version().version_compare('>=0.50.0')
+ test(
+ name,
+ test_program,
+ env : test_env,
+ protocol : 'tap',
+ )
+ else
+ test(
+ name,
+ test_program,
+ env : test_env,
+ )
+ endif
+endforeach
+
+foreach test_script : test_scripts
+ if meson.version().version_compare('>=0.50.0')
+ test(
+ test_script,
+ bash,
+ args : [test_script],
+ env : test_env,
+ protocol : 'tap',
+ )
+ else
+ test(
+ test_script,
+ bash,
+ args : [test_script],
+ env : test_env,
+ )
+ endif
+endforeach