os-autoinst-distri-rocky-mi.../tests/desktop_terminal.pm
Michel Normand cc9be973cf Use $serialdev in desktop_terminal.pm not ttyS0
$serialdev is set in os-autoinst/testapi.pm

required at least for ppc64le.

Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
2020-12-03 13:07:25 +01:00

33 lines
864 B
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self=shift;
check_desktop;
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/${serialdev}\n";
die "terminal command failed" unless defined wait_serial "ls OK";
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et: