summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2020-06-05 14:06:36 +0100
committerWim Taymans <wim.taymans@gmail.com>2020-06-16 17:58:02 +0000
commitb852b58f82dd05b644679a421c70e42ede8f0b97 (patch)
tree7500f72cdaf6a408794f31992035f1cce76b5cc2 /meson.build
parent8b97d2ae74a91d02b8196ac78de7810e2190df6d (diff)
Optionally install examples and tests
This makes it easier to test PipeWire in its "as-installed" state, for example in an OS distribution. The .test metadata files in ${datadir}/installed-tests/${package} are a convention taken from GNOME's installed-tests initiative, allowing a generic test-runner like gnome-desktop-testing to discover and run tests in an automatic way. The installation path ${libexecdir}/installed-tests/${package} is also a convention borrowed from GNOME's installed-tests initiative. In addition to the automated tests, I've installed example executables in the same place, for manual testing. They could be separated into a different directory if desired, but they seem like they have more similarities with the automated tests than differences: both are there to test that PipeWire works correctly, and neither should be relied on for production use. Some examples are installed in deeper subdirectories to avoid name clashes. Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build6
1 files changed, 6 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c93cef4b..088e43e6 100644
--- a/meson.build
+++ b/meson.build
@@ -30,6 +30,7 @@ prefix = get_option('prefix')
pipewire_bindir = join_paths(prefix, get_option('bindir'))
pipewire_datadir = join_paths(prefix, get_option('datadir'))
pipewire_libdir = join_paths(prefix, get_option('libdir'))
+pipewire_libexecdir = join_paths(prefix, get_option('libexecdir'))
pipewire_localedir = join_paths(prefix, get_option('localedir'))
pipewire_sysconfdir = join_paths(prefix, get_option('sysconfdir'))
@@ -303,6 +304,11 @@ alsa_dep = (get_option('pipewire-alsa')
? dependency('alsa', version : '>=1.1.7')
: dependency('', required: false))
+installed_tests_metadir = join_paths(pipewire_datadir, 'installed-tests', pipewire_name)
+installed_tests_execdir = join_paths(pipewire_libexecdir, 'installed-tests', pipewire_name)
+installed_tests_enabled = get_option('installed_tests')
+installed_tests_template = files('template.test.in')
+
subdir('spa')
subdir('src')