1
0
Fork 0

tests: Start pipewire and wireplumber for the native-unit test

So far, the tests relied on the host system to provide pipewire and
wireplumber. This seperates the tests from the host system which is
especially useful if the tests are run in a toolbox which has a
different pipewire installed than the host. It also should make it
harder to have a mismatch between the pipewire library and the pipewire
daemon.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3966>
This commit is contained in:
Sebastian Wick 2024-08-21 14:02:39 +02:00 committed by Marge Bot
parent 7bcc8c19cb
commit 41f0194280
2 changed files with 16 additions and 1 deletions

View file

@ -370,6 +370,7 @@ test_cases += [
'depends': [ 'depends': [
screen_cast_client, screen_cast_client,
], ],
'launch': [ 'pipewire', 'wireplumber' ],
}, },
{ {
'name': 'pointer-constraints', 'name': 'pointer-constraints',
@ -682,9 +683,19 @@ foreach test_case: test_cases
test_depends = [ default_plugin ] + test_case.get('depends', []) test_depends = [ default_plugin ] + test_case.get('depends', [])
test_case_env = environment()
test_case_env_variables = test_env_variables
test_case_env_variables += {
'MUTTER_DBUS_RUNNER_LAUNCH': ','.join(test_case.get('launch', []))
}
foreach name, value: test_case_env_variables
test_case_env.set(name, value)
endforeach
test(test_case['name'], test_executable, test(test_case['name'], test_executable,
suite: ['core', 'mutter/' + test_case['suite']], suite: ['core', 'mutter/' + test_case['suite']],
env: test_env, env: test_case_env,
depends: test_depends, depends: test_depends,
is_parallel: false, is_parallel: false,
timeout: 60, timeout: 60,

View file

@ -298,6 +298,10 @@ def meta_run(klass):
else: else:
print('WARNING: Command or separator `--` not found', file=sys.stderr) print('WARNING: Command or separator `--` not found', file=sys.stderr)
launch = os.getenv('MUTTER_DBUS_RUNNER_LAUNCH')
if launch:
args.launch.append(launch.split(','))
if args.no_isolate_dirs: if args.no_isolate_dirs:
return meta_run_klass(klass, args, rest) return meta_run_klass(klass, args, rest)