mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2025-12-24 10:50:04 +01:00
tests: add pipewire env variables when running tests, tidy up common_env
Related to pipewire!767
This commit is contained in:
parent
b222411356
commit
c24db9f353
4 changed files with 36 additions and 24 deletions
|
|
@ -28,6 +28,32 @@ if valgrind.found()
|
|||
timeout_multiplier: 2)
|
||||
endif
|
||||
|
||||
# The common test environment
|
||||
common_test_env = environment({
|
||||
'XDG_CONFIG_HOME': meson.current_build_dir() / '.config',
|
||||
'WIREPLUMBER_CONFIG_DIR': '/invalid',
|
||||
'WIREPLUMBER_DATA_DIR': '/invalid',
|
||||
'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / 'modules',
|
||||
'WIREPLUMBER_DEBUG': '7',
|
||||
})
|
||||
|
||||
spa_plugindir = spa_dep.get_variable(
|
||||
pkgconfig: 'plugindir', internal: 'plugindir', default_value: '')
|
||||
pipewire_moduledir = pipewire_dep.get_variable(
|
||||
pkgconfig: 'moduledir', internal: 'moduledir', default_value: '')
|
||||
pipewire_confdatadir = pipewire_dep.get_variable(
|
||||
pkgconfig: 'confdatadir', internal: 'confdatadir', default_value: '')
|
||||
|
||||
if spa_plugindir != ''
|
||||
common_test_env.set('SPA_PLUGIN_DIR', spa_plugindir)
|
||||
endif
|
||||
if pipewire_moduledir != ''
|
||||
common_test_env.set('PIPEWIRE_MODULE_DIR', pipewire_moduledir)
|
||||
endif
|
||||
if pipewire_confdatadir != ''
|
||||
common_test_env.set('PIPEWIRE_CONFIG_DIR', pipewire_confdatadir)
|
||||
endif
|
||||
|
||||
subdir('wp')
|
||||
subdir('wplua')
|
||||
subdir('wpipc', if_found: wpipc_dep)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep]
|
||||
common_env = environment({
|
||||
'G_TEST_SRCDIR': meson.current_source_dir(),
|
||||
'G_TEST_BUILDDIR': meson.current_build_dir(),
|
||||
'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
|
||||
'WIREPLUMBER_DEBUG': '7',
|
||||
})
|
||||
common_env = common_test_env
|
||||
common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||
common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||
common_args = [
|
||||
'-DG_LOG_USE_STRUCTURED',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
common_deps = [gobject_dep, gio_dep, wp_dep, pipewire_dep]
|
||||
common_env = environment({
|
||||
'G_TEST_SRCDIR': meson.current_source_dir(),
|
||||
'G_TEST_BUILDDIR': meson.current_build_dir(),
|
||||
'XDG_CONFIG_HOME': meson.current_build_dir() / '.config',
|
||||
'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
|
||||
'WIREPLUMBER_DEBUG': '7',
|
||||
})
|
||||
common_env = common_test_env
|
||||
common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||
common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||
common_args = [
|
||||
'-DG_LOG_USE_STRUCTURED',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,18 +1,13 @@
|
|||
common_deps = [wplua_dep, pipewire_dep, wp_dep]
|
||||
common_env = environment({
|
||||
'G_TEST_SRCDIR': meson.current_source_dir(),
|
||||
'G_TEST_BUILDDIR': meson.current_build_dir(),
|
||||
'WIREPLUMBER_CONFIG_DIR': '/invalid',
|
||||
'WIREPLUMBER_DATA_DIR': meson.current_source_dir(),
|
||||
'WIREPLUMBER_MODULE_DIR': meson.current_build_dir() / '..' / '..' / 'modules',
|
||||
'WIREPLUMBER_DEBUG': '7',
|
||||
})
|
||||
common_env = common_test_env
|
||||
common_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||
common_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||
common_env.set('WIREPLUMBER_DATA_DIR', meson.current_source_dir())
|
||||
|
||||
test(
|
||||
'test-wplua',
|
||||
executable('test-wplua', 'wplua.c', dependencies: common_deps),
|
||||
env: common_env,
|
||||
workdir : meson.current_source_dir(),
|
||||
)
|
||||
|
||||
script_tester = executable('script-tester',
|
||||
|
|
@ -25,12 +20,10 @@ test(
|
|||
script_tester,
|
||||
args: ['pod.lua'],
|
||||
env: common_env,
|
||||
workdir : meson.current_source_dir(),
|
||||
)
|
||||
test(
|
||||
'test-lua-monitor-rules',
|
||||
script_tester,
|
||||
args: ['monitor-rules.lua'],
|
||||
env: common_env,
|
||||
workdir : meson.current_source_dir(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue