From c938db7b61951568b4a732c7914ad29a293909c4 Mon Sep 17 00:00:00 2001 From: Trevor Cooper Date: Sat, 7 Jan 2023 12:04:07 -0800 Subject: [PATCH] Make internal state marker variables upper-case We use variables to track test state across modules, sometimes. As this is all internal to the test logic I didn't bother always making these variables upper-case, but os-autoinst now treats lower-case variables as a fatal error, so we have to change. Signed-off-by: Adam Williamson (#140) --- lib/utils.pm | 6 +++--- tests/_graphical_wait_login.pm | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index 95be62ab..3777f7cc 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -685,7 +685,7 @@ sub console_initial_setup { type_string "c\n"; wait_still_screen 7; - assert_screen "console_initial_setup_done", 30; + assert_screen "console_initial_SETUP_DONE", 30; type_string "c\n"; # continue } @@ -700,7 +700,7 @@ sub handle_welcome_screen { else { record_soft_failure "Welcome tour missing"; } - set_var("_welcome_done", 1); + set_var("_WELCOME_DONE", 1); } sub gnome_initial_setup { @@ -808,7 +808,7 @@ sub gnome_initial_setup { handle_welcome_screen; } # don't do it again on second load - set_var("_setup_done", 1); + set_var("_SETUP_DONE", 1); } sub _type_user_password { diff --git a/tests/_graphical_wait_login.pm b/tests/_graphical_wait_login.pm index 2d629134..db377b63 100644 --- a/tests/_graphical_wait_login.pm +++ b/tests/_graphical_wait_login.pm @@ -22,7 +22,7 @@ sub run { } # Handle pre-login initial setup if we're doing INSTALL_NO_USER - if (get_var("INSTALL_NO_USER") && !get_var("_setup_done")) { + if (get_var("INSTALL_NO_USER") && !get_var("_SETUP_DONE")) { if (get_var("DESKTOP") eq 'gnome') { gnome_initial_setup(prelogin=>1, timeout=>$wait_time); } @@ -31,7 +31,7 @@ sub run { # wait out animation wait_still_screen 3; assert_and_click "initialsetup_finish_configuration"; - set_var("_setup_done", 1); + set_var("_SETUP_DONE", 1); } $wait_time = 300; } @@ -107,20 +107,20 @@ sub run { if ($version_major < 9) { # before GNOME 40 we get a per-user version of # gnome-initial-setup here... - gnome_initial_setup() unless (get_var("_setup_done")); + gnome_initial_setup() unless (get_var("_SETUP_DONE")); } else { # ...from GNOME 40 on, we just get a "Welcome" tour - handle_welcome_screen unless (get_var("_welcome_done")); + handle_welcome_screen unless (get_var("_WELCOME_DONE")); } } if (get_version_major() > 8) { - handle_welcome_screen unless (get_var("_welcome_done")); + handle_welcome_screen unless (get_var("_WELCOME_DONE")); } if (get_var("DESKTOP") eq 'gnome' && get_var("INSTALL_NO_USER")) { # handle welcome screen if we didn't do it above (holy flow # control, Batman!) - handle_welcome_screen unless (get_var("_welcome_done")); + handle_welcome_screen unless (get_var("_WELCOME_DONE")); # if this was an image deployment, we also need to create # root user now, for subsequent tests to work if (get_var("IMAGE_DEPLOY")) {