mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-21 02:08:29 +00:00
aca7de2861
Well, that OCR needle isn't working out so great, as it seems to match when it shouldn't: https://openqa.fedoraproject.org/tests/119217#step/_graphical_wait_login/5 So let's try another approach. Ditch the OCR needle and have a function for checking we're at a clean desktop. It does the normal needle match, but if we're on GNOME, it also tries hitting alt+f1 and seeing if we're at the overview; if so, it hits alt+f1 again (to go back to the desktop) and returns.
33 lines
851 B
Perl
33 lines
851 B
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub run {
|
|
my $self=shift;
|
|
check_desktop_clean;
|
|
menu_launch_type('terminal');
|
|
wait_still_screen 5;
|
|
# need to be root
|
|
my $rootpass = get_var("ROOT_PASSWORD", "weakpassword");
|
|
type_string "su\n", 20;
|
|
wait_still_screen 3;
|
|
# can't use type_safely for now as current implementation relies
|
|
# on screen change checks, and there is no screen change here
|
|
type_string "$rootpass\n", 1;
|
|
wait_still_screen 3;
|
|
# if we can run something successfully, we're at a console;
|
|
# we're reinventing assert_script_run instead of using it so
|
|
# we can type safely
|
|
type_very_safely "ls && echo 'ls OK' > /dev/ttyS0\n";
|
|
wait_serial "ls OK" || die "terminal command failed";
|
|
}
|
|
|
|
sub test_flags {
|
|
return { fatal => 1 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|