From 9392c66b455be8820531754f5efce55fff1f3839 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 12 Nov 2020 10:20:34 -0800 Subject: [PATCH] Try hitting enter a few times at GNOME login screen if necessary Another aarch64 robustness fix...sometimes hitting enter at GDM just doesn't seem to work, let's give it three tries if needed. Signed-off-by: Adam Williamson --- tests/_graphical_wait_login.pm | 6 ++++-- tests/desktop_notifications.pm | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/_graphical_wait_login.pm b/tests/_graphical_wait_login.pm index 27f22466..c7b04798 100644 --- a/tests/_graphical_wait_login.pm +++ b/tests/_graphical_wait_login.pm @@ -46,8 +46,10 @@ sub run { # GDM 3.24.1 dumps a cursor in the middle of the screen here... mouse_hide; if (get_var("DESKTOP") eq 'gnome') { - # we have to hit enter to get the password dialog - send_key "ret"; + # we have to hit enter to get the password dialog, and it + # doesn't always work for some reason so just try it three + # times + send_key_until_needlematch("graphical_login_input", "ret", 3, 5); } assert_screen "graphical_login_input"; # seems like we often double-type on aarch64 if we start right diff --git a/tests/desktop_notifications.pm b/tests/desktop_notifications.pm index 5934347d..296dc4f2 100644 --- a/tests/desktop_notifications.pm +++ b/tests/desktop_notifications.pm @@ -60,8 +60,10 @@ sub run { # GDM 3.24.1 dumps a cursor in the middle of the screen here... mouse_hide; if (get_var("DESKTOP") eq 'gnome') { - # we have to hit enter to get the password dialog - send_key "ret"; + # we have to hit enter to get the password dialog, and it + # doesn't always work for some reason so just try it three + # times + send_key_until_needlematch("graphical_login_input", "ret", 3, 5); } assert_screen "graphical_login_input"; type_very_safely get_var("USER_PASSWORD", "weakpassword");