Skip to content

Commit

Permalink
Revert "Adjust from susedistribution which do not work with serial te…
Browse files Browse the repository at this point in the history
…rminal"
  • Loading branch information
Vogtinator committed Oct 13, 2022
1 parent 90911b1 commit 7e7c833
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 84 deletions.
13 changes: 4 additions & 9 deletions lib/susedistribution.pm
Expand Up @@ -31,7 +31,7 @@ Base class implementation of distribution class necessary for testapi

# don't import script_run - it will overwrite script_run from distribution and create a recursion
use testapi qw(send_key %cmd assert_screen check_screen check_var click_lastmatch get_var save_screenshot
match_has_tag set_var type_password type_string enter_cmd wait_serial $serialdev is_serial_terminal
match_has_tag set_var type_password type_string enter_cmd wait_serial $serialdev
mouse_hide send_key_until_needlematch record_info record_soft_failure
wait_still_screen wait_screen_change get_required_var diag);

Expand Down Expand Up @@ -59,11 +59,7 @@ sub handle_password_prompt {
$console //= '';

return if get_var("LIVETEST") || get_var('LIVECD');
if (is_serial_terminal()) {
wait_serial(qr/Password:\s*$/i, timeout => 30);
} else {
assert_screen("password-prompt", 60);
}
assert_screen("password-prompt", 60);
if ($console eq 'hyperv-intermediary') {
type_string get_required_var('VIRSH_GUEST_PASSWORD');
}
Expand Down Expand Up @@ -351,14 +347,13 @@ sub script_sudo {

my $str = time;
if ($wait > 0) {
$prog .= "; echo $str-\$?-" unless $prog eq 'bash';
$prog .= " > /dev/$testapi::serialdev" unless is_serial_terminal();
$prog = "$prog; echo $str-\$?- > /dev/$testapi::serialdev" unless $prog eq 'bash';
}
enter_cmd "clear"; # poo#13710
enter_cmd "su -c \'$prog\'", max_interval => 125;
handle_password_prompt unless ($testapi::username eq 'root');
if ($wait > 0) {
if ($prog =~ /^bash/) {
if ($prog eq 'bash') {
return wait_still_screen(4, 8);
}
else {
Expand Down
75 changes: 0 additions & 75 deletions t/10_susedistribution.t

This file was deleted.

0 comments on commit 7e7c833

Please sign in to comment.