mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-18 03:01:26 +00:00
0f8f6082eb
IoT is becoming a release-blocking edition for F32, so we should be testing it for sure. We may add specific tests, but for now let's run the install and base tests on it. Signed-off-by: Adam Williamson <awilliam@redhat.com>
51 lines
1.5 KiB
Perl
51 lines
1.5 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
# If UPGRADE is set, we have to wait for the entire upgrade
|
|
my $wait_time = 300;
|
|
$wait_time = 6000 if (get_var("UPGRADE"));
|
|
|
|
# handle bootloader, if requested
|
|
if (get_var("GRUB_POSTINSTALL")) {
|
|
do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"), timeout=>$wait_time);
|
|
$wait_time = 180;
|
|
}
|
|
|
|
# handle initial-setup, if we're expecting it (the variable is set
|
|
# and this is an install test)
|
|
my $testname = get_var("TEST");
|
|
if (get_var("CONSOLE_INITIAL_SETUP") && index($testname, 'install') != -1) {
|
|
assert_screen "console_initial_setup", $wait_time;
|
|
type_string "q\n";
|
|
type_string "yes\n";
|
|
$wait_time = 180;
|
|
}
|
|
|
|
# Wait for the text login
|
|
boot_to_login_screen(timeout => $wait_time);
|
|
|
|
# do user login unless USER_LOGIN is set to string 'false'
|
|
unless (get_var("USER_LOGIN") eq "false") {
|
|
# this avoids us waiting 90 seconds for a # to show up
|
|
my $origprompt = $testapi::distri->{serial_term_prompt};
|
|
$testapi::distri->{serial_term_prompt} = '$ ';
|
|
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
|
|
$testapi::distri->{serial_term_prompt} = $origprompt;
|
|
}
|
|
if (get_var("ROOT_PASSWORD")) {
|
|
console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));
|
|
}
|
|
}
|
|
|
|
sub test_flags {
|
|
return { fatal => 1, milestone => 1 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|