From bbf6d88d541455ba5c48275ef0a25a9ebd9911e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 2 Mar 2021 10:37:27 +0100 Subject: [PATCH] test-utils: Expose helper for ensuring client path Will be used by the test context to reduce boiler plate. Part-of: --- src/tests/test-utils.c | 8 ++++---- src/tests/test-utils.h | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/tests/test-utils.c b/src/tests/test-utils.c index ca332a0b9..0f4c16510 100644 --- a/src/tests/test-utils.c +++ b/src/tests/test-utils.c @@ -58,9 +58,9 @@ G_DEFINE_QUARK (test-runner-error-quark, test_runner_error) static char *test_client_path; -static void -ensure_test_client_path (int argc, - char **argv) +void +meta_ensure_test_client_path (int argc, + char **argv) { test_client_path = g_test_build_filename (G_TEST_BUILT, "src", @@ -92,7 +92,7 @@ test_init (int *argc, g_test_init (argc, argv, NULL); g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id="); - ensure_test_client_path (*argc, *argv); + meta_ensure_test_client_path (*argc, *argv); meta_wayland_override_display_name ("mutter-test-display"); meta_xwayland_override_display_number (512); diff --git a/src/tests/test-utils.h b/src/tests/test-utils.h index 1710b98e0..06a8d085d 100644 --- a/src/tests/test-utils.h +++ b/src/tests/test-utils.h @@ -86,4 +86,7 @@ const char * test_get_plugin_name (void); void test_wait_for_x11_display (void); +void meta_ensure_test_client_path (int argc, + char **argv); + #endif /* TEST_UTILS_H */