mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-12-20 17:58:29 +00:00
dcb68d93c8
Summary: os-autoinst implements `script_run` itself now, we aren't required to implement it ourselves any more. os-autoinst's implementation is better than ours, as it allows for verifying the script actually ran (via the redirect-output-to-serial- console trick). So this drops our implementation so we'll just use the upstream one. Where I judged we don't want to bother with the 'check the command actually ran' feature I've adjusted our direct `script_run` calls to pass a wait time of 0, which skips the 'wait for command to run' stuff entirely and just does a simple 'type the string and hit enter'. Because of how the inheritance works, our `assert_script_run` calls already used the os-autoinst `script_run`, rather than the one from our distribution. This should prevent `prepare_test_packages` sometimes going wrong right after removing the python3-kickstart package, as we'll properly wait for that removal to complete now (before we weren't, we'd just start typing the next command while it was still running, which could result in lost keypresses). Test Plan: Check all tests still run OK (I've tried this on staging and it seems fine). Reviewers: jskladan, garretraziel Reviewed By: garretraziel Subscribers: tflink Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1034
37 lines
854 B
Perl
37 lines
854 B
Perl
package fedoradistribution;
|
|
use base 'distribution';
|
|
|
|
# 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_sudo
|
|
# type_password
|
|
|
|
# importing whole testapi creates circular dependency, so import only
|
|
# necessary functions from testapi
|
|
use testapi qw(send_key type_string wait_idle assert_screen);
|
|
|
|
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, 20;
|
|
wait_idle 5; # because of KDE dialog - SUSE guys are doing the same!
|
|
send_key "ret", 1;
|
|
}
|
|
|
|
1;
|
|
# vim: set sw=4 et:
|