mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-22 13:11:26 +00:00
6c52a1c1dd
The needle match seems to have changed when bug #1957858 showed up, but it's actually just a text rendering change in the window title, it's not exactly caused by the tiny window. So not marking as a workaround needle. Maximizing the window makes the test work faster when we hit that bug, as type_safely needs to be able to see the results of its typing. Signed-off-by: Adam Williamson <awilliam@redhat.com>
39 lines
1.2 KiB
Perl
39 lines
1.2 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
my $relnum = get_release_number;
|
|
my $desktop = get_var("DESKTOP");
|
|
check_desktop;
|
|
menu_launch_type('terminal');
|
|
assert_screen "apps_run_terminal";
|
|
# FIXME: workaround for RHBZ#1957858 - test actually works without
|
|
# this, but very slowly as characters don't appear on screen
|
|
send_key "super-pgup" if ($relnum > 33 && $desktop eq "kde");
|
|
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/${serialdev}\n";
|
|
die "terminal command failed" unless defined wait_serial "ls OK";
|
|
}
|
|
|
|
sub test_flags {
|
|
return { fatal => 1 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|