mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
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>
This commit is contained in:
parent
8b97d2ae74
commit
b852b58f82
10 changed files with 158 additions and 27 deletions
|
|
@ -11,18 +11,41 @@ foreach a : test_apps
|
|||
dependencies : [dl_lib, pthread_lib, mathlib ],
|
||||
include_directories : [spa_inc ],
|
||||
c_args : [ '-D_GNU_SOURCE' ],
|
||||
install : false),
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir),
|
||||
env : [
|
||||
'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
|
||||
])
|
||||
|
||||
if installed_tests_enabled
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('exec', join_paths(installed_tests_execdir, 'spa-' + a))
|
||||
configure_file(
|
||||
input: installed_tests_template,
|
||||
output: 'spa-' + a + '.test',
|
||||
install_dir: installed_tests_metadir,
|
||||
configuration: test_conf
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if have_cpp
|
||||
test_cpp = executable('spa-test-cpp', 'test-cpp.cpp',
|
||||
include_directories : [spa_inc ],
|
||||
dependencies : [],
|
||||
install : false)
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir)
|
||||
test('spa-test-cpp', test_cpp)
|
||||
if installed_tests_enabled
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('exec', join_paths(installed_tests_execdir, 'spa-test-cpp'))
|
||||
configure_file(
|
||||
input: installed_tests_template,
|
||||
output: 'spa-test-cpp.test',
|
||||
install_dir: installed_tests_metadir,
|
||||
configuration: test_conf
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
||||
benchmark_apps = [
|
||||
|
|
@ -37,8 +60,20 @@ foreach a : benchmark_apps
|
|||
dependencies : [dl_lib, pthread_lib, mathlib ],
|
||||
include_directories : [spa_inc ],
|
||||
c_args : [ '-D_GNU_SOURCE' ],
|
||||
install : false),
|
||||
install : installed_tests_enabled,
|
||||
install_dir : installed_tests_execdir),
|
||||
env : [
|
||||
'SPA_PLUGIN_DIR=@0@/spa/plugins/'.format(meson.build_root()),
|
||||
])
|
||||
|
||||
if installed_tests_enabled
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('exec', join_paths(installed_tests_execdir, 'spa-' + a))
|
||||
configure_file(
|
||||
input: installed_tests_template,
|
||||
output: 'spa-' + a + '.test',
|
||||
install_dir: installed_tests_metadir,
|
||||
configuration: test_conf
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue