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 <awilliam@redhat.com> (#140)

This commit is contained in:
Trevor Cooper 2023-01-07 12:04:07 -08:00 committed by GitHub
parent b243e1d022
commit c938db7b61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -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 {

View File

@ -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")) {