summaryrefslogtreecommitdiffstats
path: root/src/tests/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:28:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:28:17 +0000
commit7a46c07230b8d8108c0e8e80df4522d0ac116538 (patch)
treed483300dab478b994fe199a5d19d18d74153718a /src/tests/meson.build
parentInitial commit. (diff)
downloadpipewire-upstream/0.3.65.tar.xz
pipewire-upstream/0.3.65.zip
Adding upstream version 0.3.65.upstream/0.3.65upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/meson.build')
-rw-r--r--src/tests/meson.build52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/tests/meson.build b/src/tests/meson.build
new file mode 100644
index 0000000..f7c54f2
--- /dev/null
+++ b/src/tests/meson.build
@@ -0,0 +1,52 @@
+test_apps = [
+ 'test-endpoint',
+ 'test-interfaces',
+ # 'test-remote',
+ 'test-stream',
+ 'test-filter',
+]
+
+foreach a : test_apps
+ test('pw-' + a,
+ executable('pw-' + a, a + '.c',
+ dependencies : [pipewire_dep],
+ include_directories: [includes_inc],
+ install : installed_tests_enabled,
+ install_dir : installed_tests_execdir),
+ env : [
+ 'SPA_PLUGIN_DIR=@0@'.format(spa_dep.get_variable('plugindir')),
+ 'PIPEWIRE_CONFIG_DIR=@0@'.format(pipewire_dep.get_variable('confdatadir')),
+ 'PIPEWIRE_MODULE_DIR=@0@'.format(pipewire_dep.get_variable('moduledir')),
+ ])
+
+ if installed_tests_enabled
+ test_conf = configuration_data()
+ test_conf.set('exec', installed_tests_execdir / 'pw-' + a)
+ configure_file(
+ input: installed_tests_template,
+ output: 'pw-' + a + '.test',
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
+ )
+ endif
+endforeach
+
+
+if have_cpp
+ test_cpp = executable('pw-test-cpp', 'test-cpp.cpp',
+ dependencies : [pipewire_dep],
+ install : installed_tests_enabled,
+ install_dir : installed_tests_execdir)
+ test('pw-test-cpp', test_cpp)
+
+ if installed_tests_enabled
+ test_conf = configuration_data()
+ test_conf.set('exec', installed_tests_execdir / 'pw-test-cpp')
+ configure_file(
+ input: installed_tests_template,
+ output: 'pw-test-cpp.test',
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
+ )
+ endif
+endif