Commit c24db9f3 authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

tests: add pipewire env variables when running tests, tidy up common_env

Related to pipewire!767
parent b2224113
Pipeline #342545 passed with stages
in 1 minute and 51 seconds
......@@ -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)
......
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',
]
......
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',
]
......
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(),
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment