mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2025-01-31 08:28:34 +00:00
meson: Put test setup behind a feature option
This should allow the following cases: - In case of "auto" (the default): meson will check if the necessary binaries are installed (such as `dbus-run-session`) on the system and fall back. - In case of "enabled": meson will require the necessary binaries to be installed - In case of "disabled": meson will not try to mark this as the default test setup. The first case was already the default, however, some systems have a preconfigured test setup which they'd like to use instead. Allow them to disable the default test setup in that case. Fixes: https://gitlab.gnome.org/GNOME/libsecret/-/issues/101
This commit is contained in:
parent
ff037ab89f
commit
219c3f3c48
@ -102,7 +102,7 @@ test_env = environment()
|
||||
test_env.set('abs_top_builddir', meson.build_root())
|
||||
|
||||
# Most tests require a D-Bus session, so try to wrap automatically with dbus-run-session
|
||||
dbus_run_session = find_program('dbus-run-session', required: false)
|
||||
dbus_run_session = find_program('dbus-run-session', required: get_option('test_setup'))
|
||||
if dbus_run_session.found()
|
||||
add_test_setup('dbus',
|
||||
exe_wrapper: dbus_run_session,
|
||||
|
@ -61,3 +61,8 @@ option('pam',
|
||||
description: 'Build PAM module',
|
||||
)
|
||||
|
||||
option('test_setup',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Automatically setup a test environment when running tests',
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user