mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-02-16 12:34:32 +00:00
Simplify _graphical_wait_login welcome screen logic
This turns out to be overcomplicated. We don't need the special handling for updates any more, because a few months after we implemented it, we had to make sure the affected update tests had an empty START_AFTER_TEST anyway, or else openQA would refuse to schedule them. So we can just rely on the START_AFTER_TEST condition for those now. We also don't need the additional INSTALL_NO_USER condition; the only case where it's actually used is for install_arm_image_deployment_upload on Workstation, and that test does not have START_AFTER_TEST set, so the other condition catches it for welcome screen handling purposes. There is no need to nest the IMAGE_DEPLOY conditional inside a check for the desktop and the INSTALL_NO_USER var either; we don't test any other desktop on ARM, and the IMAGE_DEPLOY var is only set for that one install_arm_image_deployment_upload test. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
f915297475
commit
ffbb618d03
@ -87,31 +87,27 @@ sub run {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# For GNOME, handle initial-setup or welcome tour, unless START_AFTER_TEST
|
# For GNOME, handle initial-setup or welcome tour, unless _WELCOME_DONE
|
||||||
# is set in which case it will have been done already. Always
|
# is set (indicating it's been done previously within this test run,
|
||||||
# do it if ADVISORY_OR_TASK is set, as for the update testing flow,
|
# e.g. the second time this module runs on the update flow, or earlier
|
||||||
# START_AFTER_TEST is set but a no-op and this hasn't happened
|
# in the boot process on the INSTALL_NO_USER flow), or START_AFTER_TEST
|
||||||
if ($desktop eq 'gnome' && (get_var("ADVISORY_OR_TASK") || !get_var("START_AFTER_TEST"))) {
|
# is set to the same value as DEPLOY_UPLOAD_TEST (in which case it will
|
||||||
# as this test gets loaded twice on the ADVISORY_OR_TASK flow, and
|
# have been done by the previous test run)
|
||||||
# we might be on the INSTALL_NO_USER flow, check whether
|
# the point of the default values here is to make the check fail if
|
||||||
# this happened already
|
# neither var is set, without needing an extra condition
|
||||||
handle_welcome_screen unless (get_var("_WELCOME_DONE"));
|
my $sat = get_var("START_AFTER_TEST", "1");
|
||||||
}
|
my $dut = get_var("DEPLOY_UPLOAD_TEST", "2");
|
||||||
if ($desktop eq 'gnome' && get_var("INSTALL_NO_USER")) {
|
handle_welcome_screen if ($desktop eq 'gnome' && $sat ne $dut && !get_var("_WELCOME_DONE"));
|
||||||
# handle welcome screen if we didn't do it above (holy flow
|
if (get_var("IMAGE_DEPLOY")) {
|
||||||
# control, Batman!)
|
|
||||||
handle_welcome_screen unless (get_var("_WELCOME_DONE"));
|
|
||||||
# if this was an image deployment, we also need to create
|
# if this was an image deployment, we also need to create
|
||||||
# root user now, for subsequent tests to work
|
# root user now, for subsequent tests to work
|
||||||
if (get_var("IMAGE_DEPLOY")) {
|
send_key "ctrl-alt-f3";
|
||||||
send_key "ctrl-alt-f3";
|
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
|
||||||
console_login(user => get_var("USER_LOGIN", "test"), password => get_var("USER_PASSWORD", "weakpassword"));
|
type_string "sudo su\n";
|
||||||
type_string "sudo su\n";
|
type_string "$password\n";
|
||||||
type_string "$password\n";
|
my $root_password = get_var("ROOT_PASSWORD") || "weakpassword";
|
||||||
my $root_password = get_var("ROOT_PASSWORD") || "weakpassword";
|
assert_script_run "echo 'root:$root_password' | chpasswd";
|
||||||
assert_script_run "echo 'root:$root_password' | chpasswd";
|
desktop_vt;
|
||||||
desktop_vt;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Move the mouse somewhere it won't highlight the match areas
|
# Move the mouse somewhere it won't highlight the match areas
|
||||||
|
Loading…
Reference in New Issue
Block a user