2016-05-05 23:39:47 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
2016-05-05 23:39:47 +00:00
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self=shift;
|
2017-07-10 18:41:02 +00:00
|
|
|
check_desktop_clean;
|
2017-01-18 07:15:44 +00:00
|
|
|
menu_launch_type('terminal');
|
2016-05-05 23:39:47 +00:00
|
|
|
wait_still_screen 5;
|
|
|
|
# need to be root
|
|
|
|
my $rootpass = get_var("ROOT_PASSWORD", "weakpassword");
|
2016-09-12 17:24:30 +00:00
|
|
|
type_string "su\n", 20;
|
2016-05-05 23:39:47 +00:00
|
|
|
wait_still_screen 3;
|
2016-09-12 17:24:30 +00:00
|
|
|
# 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;
|
2016-05-05 23:39:47 +00:00
|
|
|
wait_still_screen 3;
|
2016-09-12 17:24:30 +00:00
|
|
|
# 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";
|
2016-05-05 23:39:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
return { fatal => 1 };
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|