mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 05:53:09 +00:00
ec6b3ff4a3
Use validate_script_output and regex matching instead of type_string and needles. Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D637
45 lines
871 B
Perl
45 lines
871 B
Perl
package fedoradistribution;
|
|
use base 'distribution';
|
|
|
|
use testapi;
|
|
|
|
# Fedora distribution class
|
|
|
|
# Distro-specific functions, that are actually part of the API
|
|
# (and it's completely up to us to implement them) should be here
|
|
|
|
# functions that can be reimplemented:
|
|
# ensure_installed
|
|
# x11_start_program
|
|
# become_root
|
|
# script_run
|
|
# script_sudo
|
|
# type_password
|
|
|
|
use testapi qw(send_key type_string);
|
|
|
|
sub init() {
|
|
my ($self) = @_;
|
|
|
|
$self->SUPER::init();
|
|
}
|
|
|
|
sub x11_start_program($$$) {
|
|
my ($self, $program, $timeout, $options) = @_;
|
|
send_key "alt-f2";
|
|
assert_screen "desktop_runner";
|
|
type_string $program;
|
|
wait_idle 5; # because of KDE dialog - SUSE guys are doing the same!
|
|
send_key "ret", 1;
|
|
}
|
|
|
|
sub script_run {
|
|
my ($self, $program, $timeout) = @_;
|
|
|
|
type_string $program;
|
|
send_key "ret", $timeout;
|
|
}
|
|
|
|
1;
|
|
# vim: set sw=4 et:
|