tests/build: Set up test environment using a dict()

This will allow us to reuse the keys and values more easily, as later
commits will rely on being able to iterate over the keys and values to
construct explict env strings for passing into special test cases.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152>
This commit is contained in:
Jonas Ådahl 2022-02-09 10:35:53 +01:00 committed by Marge Bot
parent 858f89084e
commit 189068d465

View File

@ -90,9 +90,16 @@ if have_installed_tests
endif endif
test_env = environment() test_env = environment()
test_env.set('G_TEST_SRCDIR', join_paths(mutter_srcdir, 'src'))
test_env.set('G_TEST_BUILDDIR', mutter_builddir) test_env_variables = {
test_env.set('MUTTER_TEST_PLUGIN_PATH', '@0@'.format(default_plugin.full_path())) 'G_TEST_SRCDIR': join_paths(mutter_srcdir, 'src'),
'G_TEST_BUILDDIR': mutter_builddir,
'MUTTER_TEST_PLUGIN_PATH': '@0@'.format(default_plugin.full_path()),
}
foreach name, value: test_env_variables
test_env.set(name, value)
endforeach
test_client = executable('mutter-test-client', test_client = executable('mutter-test-client',
sources: ['test-client.c'], sources: ['test-client.c'],