From 7675e99fccecbcad0360c0bf1e33e3662b24180d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 27 Sep 2022 23:18:42 -0700 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 --- lib/utils.pm | 6 +++--- tests/_graphical_wait_login.pm | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/utils.pm b/lib/utils.pm index 54faf54c..9e720b4c 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -700,7 +700,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 } @@ -715,7 +715,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 { @@ -834,7 +834,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 3edd23f9..9c0323f5 100644 --- a/tests/_graphical_wait_login.pm +++ b/tests/_graphical_wait_login.pm @@ -40,7 +40,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 ($desktop eq 'gnome') { gnome_initial_setup(prelogin => 1, timeout => $wait_time); } @@ -49,7 +49,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; } @@ -95,12 +95,12 @@ sub run { # as this test gets loaded twice on the ADVISORY_OR_TASK flow, and # we might be on the INSTALL_NO_USER flow, check whether # this happened already - handle_welcome_screen unless (get_var("_welcome_done")); + handle_welcome_screen unless (get_var("_WELCOME_DONE")); } if ($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")) {