tests/test-utils: Allow calling set_custom_monitor_config outside tests

by using g_test_build_filename instead of g_test_get_filename.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3350>
This commit is contained in:
Sebastian Wick 2023-10-27 17:27:21 +02:00 committed by Marge Bot
parent 7454287d3b
commit 1069085612

View File

@ -766,13 +766,13 @@ meta_set_custom_monitor_config_full (MetaBackend *backend,
MetaMonitorConfigManager *config_manager = monitor_manager->config_manager;
MetaMonitorConfigStore *config_store;
GError *error = NULL;
const char *path;
g_autofree char *path = NULL;
g_assert_nonnull (config_manager);
config_store = meta_monitor_config_manager_get_store (config_manager);
path = g_test_get_filename (G_TEST_DIST, "tests", "monitor-configs",
path = g_test_build_filename (G_TEST_DIST, "tests", "monitor-configs",
filename, NULL);
if (!meta_monitor_config_store_set_custom (config_store, path, NULL,
configs_flags,