mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-28 21:23:09 +00:00
e9e967c4bf
Also be a bit more consistent about asserting we saw a terminal and waiting a bit before typing stuff. We can drop the doublek workarounds from the keyring tests as we no longer use the kicker to launch the terminal on KDE (we use ctrl-alt-t shortcut). Signed-off-by: Adam Williamson <awilliam@redhat.com>
38 lines
1.2 KiB
Perl
38 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", "gnome");
|
|
check_desktop;
|
|
# try and avoid double-typing issues
|
|
kde_doublek_workaround(key => 't') if ($desktop eq "kde");
|
|
desktop_launch_terminal;
|
|
assert_screen "apps_run_terminal";
|
|
wait_still_screen(stilltime => 5, similarity_level => 42);
|
|
# need to be root
|
|
my $rootpass = get_var("ROOT_PASSWORD", "weakpassword");
|
|
type_string "su\n", 20;
|
|
wait_still_screen(stilltime => 3, similarity_level => 42);
|
|
# 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(stilltime => 3, similarity_level => 42);
|
|
# 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:
|