1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 21:43:08 +00:00

fix some warnings that are shown during test loading

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D738
This commit is contained in:
Jan Sedlák 2016-02-10 09:42:56 +01:00
parent 596772f163
commit 944484a091
2 changed files with 21 additions and 21 deletions

View File

@ -1,8 +1,6 @@
package fedoradistribution; package fedoradistribution;
use base 'distribution'; use base 'distribution';
use testapi;
# Fedora distribution class # Fedora distribution class
# Distro-specific functions, that are actually part of the API # Distro-specific functions, that are actually part of the API
@ -16,7 +14,9 @@ use testapi;
# script_sudo # script_sudo
# type_password # type_password
use testapi qw(send_key type_string); # importing whole testapi creates circular dependency, so import inly
# necessary functions from testapi
use testapi qw(send_key type_string wait_idle assert_screen);
sub init() { sub init() {
my ($self) = @_; my ($self) = @_;
@ -24,7 +24,7 @@ sub init() {
$self->SUPER::init(); $self->SUPER::init();
} }
sub x11_start_program($$$) { sub x11_start_program {
my ($self, $program, $timeout, $options) = @_; my ($self, $program, $timeout, $options) = @_;
send_key "alt-f2"; send_key "alt-f2";
assert_screen "desktop_runner"; assert_screen "desktop_runner";

34
main.pm
View File

@ -99,17 +99,17 @@ if (get_var('LIVE')) {
# (good for tests where it doesn't make sense to use _boot_to_anaconda, _software_selection etc.) # (good for tests where it doesn't make sense to use _boot_to_anaconda, _software_selection etc.)
if (get_var("ENTRYPOINT")) if (get_var("ENTRYPOINT"))
{ {
autotest::loadtest get_var('CASEDIR')."/tests/".get_var("ENTRYPOINT").".pm"; autotest::loadtest "tests/".get_var("ENTRYPOINT").".pm";
} }
elsif (get_var("UPGRADE")) elsif (get_var("UPGRADE"))
{ {
# all upgrade tests consist of: preinstall phase (where packages are upgraded and # all upgrade tests consist of: preinstall phase (where packages are upgraded and
# dnf-plugin-system-upgrade is installed), run phase (where upgrade is run) and postinstall # dnf-plugin-system-upgrade is installed), run phase (where upgrade is run) and postinstall
# phase (where is checked if fedora was upgraded successfully) # phase (where is checked if fedora was upgraded successfully)
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_preinstall.pm"; autotest::loadtest "tests/upgrade_preinstall.pm";
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_run.pm"; autotest::loadtest "tests/upgrade_run.pm";
# UPGRADE can be set to "minimal", "encrypted", "desktop"... # UPGRADE can be set to "minimal", "encrypted", "desktop"...
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_postinstall_".get_var("UPGRADE").".pm"; autotest::loadtest "tests/upgrade_postinstall_".get_var("UPGRADE").".pm";
} }
else else
{ {
@ -120,7 +120,7 @@ else
# and reboot phase, postinstall phase # and reboot phase, postinstall phase
# boot phase is loaded automatically every time # boot phase is loaded automatically every time
autotest::loadtest get_var('CASEDIR')."/tests/_boot_to_anaconda.pm"; autotest::loadtest "tests/_boot_to_anaconda.pm";
# with kickstart tests, booting to anaconda is the only thing required (kickstart file handles # with kickstart tests, booting to anaconda is the only thing required (kickstart file handles
# everything else) # everything else)
@ -129,14 +129,14 @@ else
## Installation source ## Installation source
if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL")){ if (get_var('MIRRORLIST_GRAPHICAL') || get_var("REPOSITORY_GRAPHICAL")){
autotest::loadtest get_var('CASEDIR')."/tests/install_source_graphical.pm"; autotest::loadtest "tests/install_source_graphical.pm";
} }
if (get_var("REPOSITORY_VARIATION")){ if (get_var("REPOSITORY_VARIATION")){
autotest::loadtest get_var('CASEDIR')."/tests/install_source_variation.pm"; autotest::loadtest "tests/install_source_variation.pm";
} }
## Select package set. Minimal is the default, if 'default' is specified, skip selection. ## Select package set. Minimal is the default, if 'default' is specified, skip selection.
autotest::loadtest get_var('CASEDIR')."/tests/_software_selection.pm"; autotest::loadtest "tests/_software_selection.pm";
## Disk partitioning. ## Disk partitioning.
# If PARTITIONING is set, we pick the storage test # If PARTITIONING is set, we pick the storage test
@ -147,34 +147,34 @@ else
# if PARTITIONING is unset, or one of [...], use disk_guided_empty, # if PARTITIONING is unset, or one of [...], use disk_guided_empty,
# which is the simplest / 'default' case. # which is the simplest / 'default' case.
if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) { if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
$storage = get_var('CASEDIR')."/tests/disk_guided_empty.pm"; $storage = "tests/disk_guided_empty.pm";
} }
else { else {
$storage = get_var('CASEDIR')."/tests/disk_".$partitioning.".pm"; $storage = "tests/disk_".$partitioning.".pm";
} }
autotest::loadtest $storage; autotest::loadtest $storage;
if (get_var("ENCRYPT_PASSWORD")){ if (get_var("ENCRYPT_PASSWORD")){
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_encrypted.pm"; autotest::loadtest "tests/disk_guided_encrypted.pm";
} }
# Start installation, set user & root passwords, reboot # Start installation, set user & root passwords, reboot
# install and reboot phase is loaded automatically every time (except when KICKSTART is set) # install and reboot phase is loaded automatically every time (except when KICKSTART is set)
autotest::loadtest get_var('CASEDIR')."/tests/_do_install_and_reboot.pm"; autotest::loadtest "tests/_do_install_and_reboot.pm";
} }
# Unlock encrypted storage volumes, if necessary. The test name here # Unlock encrypted storage volumes, if necessary. The test name here
# follows the 'storage post-install' convention, but must be run earlier. # follows the 'storage post-install' convention, but must be run earlier.
if (get_var("ENCRYPT_PASSWORD")){ if (get_var("ENCRYPT_PASSWORD")){
autotest::loadtest get_var('CASEDIR')."/tests/disk_guided_encrypted_postinstall.pm"; autotest::loadtest "tests/disk_guided_encrypted_postinstall.pm";
} }
# Appropriate login method for install type # Appropriate login method for install type
if (get_var("DESKTOP")) { if (get_var("DESKTOP")) {
autotest::loadtest get_var('CASEDIR')."/tests/_graphical_wait_login.pm"; autotest::loadtest "tests/_graphical_wait_login.pm";
} }
else { else {
autotest::loadtest get_var('CASEDIR')."/tests/_console_wait_login.pm"; autotest::loadtest "tests/_console_wait_login.pm";
} }
# from now on, we have fully installed and booted system with root/specified user logged in # from now on, we have fully installed and booted system with root/specified user logged in
@ -184,13 +184,13 @@ else
# of PARTITIONING # of PARTITIONING
my $storagepost = ''; my $storagepost = '';
if (get_var('PARTITIONING')) { if (get_var('PARTITIONING')) {
my $loc = get_var('CASEDIR')."/tests/disk_".get_var('PARTITIONING')."_postinstall.pm"; my $loc = "tests/disk_".get_var('PARTITIONING')."_postinstall.pm";
$storagepost = $loc if (-e $loc); $storagepost = $loc if (-e $loc);
} }
autotest::loadtest $storagepost if ($storagepost); autotest::loadtest $storagepost if ($storagepost);
if (get_var("UEFI")) { if (get_var("UEFI")) {
autotest::loadtest get_var('CASEDIR')."/tests/uefi_postinstall.pm"; autotest::loadtest "tests/uefi_postinstall.pm";
} }
} }