From 657f1fe9344f8d59bfdbc35515041395632cb8fa Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 7 Sep 2022 19:07:21 -0500 Subject: test-application.c: Claim a dbus name passed by the caller We pass argc/argv on to atk_bridge_adaptor_init() so it can pick up the --atspi-dbus-name option. We will use this from the calling program to wait reliably for the test app to be ready. The name org.a11y.Atspi2Atk.TestApplication is just arbitrary. --- tests/at-spi2-atk/atk_test_util.c | 2 ++ tests/at-spi2-atk/test-application.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/at-spi2-atk/atk_test_util.c b/tests/at-spi2-atk/atk_test_util.c index d67c985c..9cbd5062 100644 --- a/tests/at-spi2-atk/atk_test_util.c +++ b/tests/at-spi2-atk/atk_test_util.c @@ -47,6 +47,8 @@ run_app (const char *file_name) TESTS_BUILD_DIR "/app-test", "--test-data-file", file_name, + "--atspi-dbus-name", + "org.a11y.Atspi2Atk.TestApplication", NULL); _exit (EXIT_SUCCESS); } diff --git a/tests/at-spi2-atk/test-application.c b/tests/at-spi2-atk/test-application.c index e28926b0..56ce4a18 100644 --- a/tests/at-spi2-atk/test-application.c +++ b/tests/at-spi2-atk/test-application.c @@ -118,7 +118,8 @@ main (int argc, char *argv[]) setup_atk_util (); test_init (tdata_path); - atk_bridge_adaptor_init (NULL, NULL); + + atk_bridge_adaptor_init (&argc, &argv); mainloop = g_main_loop_new (NULL, FALSE); g_unix_signal_add (SIGTERM, sigterm_received_cb, mainloop); -- cgit v1.2.1