mirror of
https://github.com/rocky-linux/os-autoinst-distri-rocky.git
synced 2024-11-20 04:01:28 +00:00
add fedup desktop test
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D451
This commit is contained in:
parent
4abc1aecf2
commit
c8f02969f2
@ -20,11 +20,17 @@ sub login_as_root {
|
|||||||
assert_screen "root_logged_in", 10;
|
assert_screen "root_logged_in", 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub boot_and_login {
|
sub boot_to_login_screen {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
wait_still_screen 10;
|
my $boot_done_screen = shift;
|
||||||
|
my $stillscreen = shift || 10;
|
||||||
|
my $timeout = shift || 60;
|
||||||
|
|
||||||
$self->login_as_root(3);
|
wait_still_screen $stillscreen, $timeout;
|
||||||
|
|
||||||
|
if ($boot_done_screen ne "") {
|
||||||
|
assert_screen $boot_done_screen;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub post_fail_hook {
|
sub post_fail_hook {
|
||||||
|
4
main.pm
4
main.pm
@ -57,8 +57,8 @@ if (get_var("ENTRYPOINT"))
|
|||||||
}
|
}
|
||||||
elsif (get_var("UPGRADE"))
|
elsif (get_var("UPGRADE"))
|
||||||
{
|
{
|
||||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_preinstall_".get_var("UPGRADE").".pm";
|
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_preinstall.pm";
|
||||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_run_".get_var("UPGRADE").".pm";
|
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_run.pm";
|
||||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_postinstall_".get_var("UPGRADE").".pm";
|
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_postinstall_".get_var("UPGRADE").".pm";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
"tags": [
|
"tags": [
|
||||||
"ENV-DESKTOP-gnome",
|
"graphical_login",
|
||||||
"ENV-DISTRI-fedora",
|
"ENV-DISTRI-fedora",
|
||||||
"ENV-INSTLANG-en_US",
|
"ENV-INSTLANG-en_US",
|
||||||
"graphical_login"
|
"ENV-FLAVOR-develop"
|
||||||
],
|
],
|
||||||
|
"properties": [],
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
"xpos": 335,
|
"width": 206,
|
||||||
"ypos": 423,
|
"type": "match",
|
||||||
"width": 67,
|
"xpos": 405,
|
||||||
"height": 12,
|
"height": 106,
|
||||||
"type": "match"
|
"ypos": 645
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 195 KiB |
25
needles/graphical_login_gdm_input.json
Normal file
25
needles/graphical_login_gdm_input.json
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"area": [
|
||||||
|
{
|
||||||
|
"xpos": 341,
|
||||||
|
"ypos": 372,
|
||||||
|
"width": 343,
|
||||||
|
"height": 65,
|
||||||
|
"type": "match"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"xpos": 600,
|
||||||
|
"ypos": 470,
|
||||||
|
"width": 80,
|
||||||
|
"height": 30,
|
||||||
|
"type": "match"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"graphical_login_input",
|
||||||
|
"ENV-DISTRI-fedora",
|
||||||
|
"ENV-INSTLANG-en_US",
|
||||||
|
"ENV-FLAVOR-develop"
|
||||||
|
],
|
||||||
|
"properties": []
|
||||||
|
}
|
BIN
needles/graphical_login_gdm_input.png
Normal file
BIN
needles/graphical_login_gdm_input.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 186 KiB |
@ -1,17 +1,18 @@
|
|||||||
{
|
{
|
||||||
"tags": [
|
"tags": [
|
||||||
"ENV-DESKTOP-default",
|
"text_console_login",
|
||||||
"ENV-DISTRI-fedora",
|
"ENV-DISTRI-fedora",
|
||||||
"ENV-INSTLANG-en_US",
|
"ENV-INSTLANG-en_US",
|
||||||
"text_console_login"
|
"ENV-FLAVOR-develop"
|
||||||
],
|
],
|
||||||
|
"properties": [],
|
||||||
"area": [
|
"area": [
|
||||||
{
|
{
|
||||||
|
"width": 128,
|
||||||
"xpos": 0,
|
"xpos": 0,
|
||||||
|
"type": "match",
|
||||||
"ypos": 49,
|
"ypos": 49,
|
||||||
"width": 140,
|
"height": 30
|
||||||
"height": 50,
|
|
||||||
"type": "match"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 809 B After Width: | Height: | Size: 1.7 KiB |
23
templates
23
templates
@ -186,6 +186,16 @@
|
|||||||
},
|
},
|
||||||
test_suite => { name => "fedup_minimal" },
|
test_suite => { name => "fedup_minimal" },
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
machine => { name => "64bit" },
|
||||||
|
product => {
|
||||||
|
arch => "x86_64",
|
||||||
|
distri => "fedora",
|
||||||
|
flavor => "universal",
|
||||||
|
version => "*",
|
||||||
|
},
|
||||||
|
test_suite => { name => "fedup_desktop" },
|
||||||
|
},
|
||||||
],
|
],
|
||||||
Machines => [
|
Machines => [
|
||||||
{
|
{
|
||||||
@ -397,10 +407,21 @@
|
|||||||
settings => [
|
settings => [
|
||||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||||
{ key => "BOOTFROM", value => "c" },
|
{ key => "BOOTFROM", value => "c" },
|
||||||
{ key => "HDD_1", value => "disk_f21.img" },
|
{ key => "HDD_1", value => "disk_f21_minimal.img" },
|
||||||
{ key => "UPGRADE", value => "minimal" },
|
{ key => "UPGRADE", value => "minimal" },
|
||||||
],
|
],
|
||||||
variables => "",
|
variables => "",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name => "fedup_desktop",
|
||||||
|
prio => 15,
|
||||||
|
settings => [
|
||||||
|
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||||
|
{ key => "BOOTFROM", value => "c" },
|
||||||
|
{ key => "HDD_1", value => "disk_f21_desktop.img" },
|
||||||
|
{ key => "UPGRADE", value => "desktop" },
|
||||||
|
],
|
||||||
|
variables => "",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
@ -2,25 +2,18 @@ use base "fedoralog";
|
|||||||
use strict;
|
use strict;
|
||||||
use testapi;
|
use testapi;
|
||||||
|
|
||||||
|
|
||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
my $password = get_var("PASSWORD", "weakpassword");
|
||||||
|
|
||||||
$self->boot_and_login();
|
$self->boot_to_login_screen("graphical_login", 20);
|
||||||
|
|
||||||
type_string 'yum -y update; echo $?';
|
|
||||||
send_key "ret";
|
send_key "ret";
|
||||||
|
assert_screen "graphical_login_input";
|
||||||
assert_screen "console_command_success", 1800;
|
type_string $password;
|
||||||
|
|
||||||
type_string "reboot";
|
|
||||||
send_key "ret";
|
send_key "ret";
|
||||||
|
assert_screen "graphical_desktop_clean", 30;
|
||||||
$self->boot_and_login();
|
|
||||||
|
|
||||||
type_string 'yum -y install fedup; echo $?';
|
|
||||||
send_key "ret";
|
|
||||||
|
|
||||||
assert_screen "console_command_success", 1800;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6,7 +6,8 @@ use testapi;
|
|||||||
sub run {
|
sub run {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
$self->boot_and_login();
|
$self->boot_to_login_screen();
|
||||||
|
$self->login_as_root(3);
|
||||||
|
|
||||||
assert_screen "console_f22_installed";
|
assert_screen "console_f22_installed";
|
||||||
}
|
}
|
||||||
|
49
tests/upgrade_preinstall.pm
Normal file
49
tests/upgrade_preinstall.pm
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
use base "fedoralog";
|
||||||
|
use strict;
|
||||||
|
use testapi;
|
||||||
|
|
||||||
|
sub run {
|
||||||
|
my $self = shift;
|
||||||
|
|
||||||
|
if (get_var('UPGRADE') eq "desktop") {
|
||||||
|
$self->boot_to_login_screen("graphical_login", 30); # GDM takes time to load
|
||||||
|
#} elsif (get_var('UPGRADE' eq "minimal")) {
|
||||||
|
} else {
|
||||||
|
$self->boot_to_login_screen();
|
||||||
|
}
|
||||||
|
$self->login_as_root(3);
|
||||||
|
|
||||||
|
type_string 'yum -y update; echo $?';
|
||||||
|
send_key "ret";
|
||||||
|
|
||||||
|
assert_screen "console_command_success", 1800;
|
||||||
|
|
||||||
|
type_string "reboot";
|
||||||
|
send_key "ret";
|
||||||
|
|
||||||
|
if (get_var('UPGRADE') eq "desktop") {
|
||||||
|
$self->boot_to_login_screen("graphical_login", 30); # GDM takes time to load
|
||||||
|
#} elsif (get_var('UPGRADE' eq "minimal")) {
|
||||||
|
} else {
|
||||||
|
$self->boot_to_login_screen();
|
||||||
|
}
|
||||||
|
$self->login_as_root(3);
|
||||||
|
|
||||||
|
type_string 'yum -y install fedup; echo $?';
|
||||||
|
send_key "ret";
|
||||||
|
|
||||||
|
assert_screen "console_command_success", 1800;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub test_flags {
|
||||||
|
# without anything - rollback to 'lastgood' snapshot if failed
|
||||||
|
# 'fatal' - whole test suite is in danger if this fails
|
||||||
|
# 'milestone' - after this test succeeds, update 'lastgood'
|
||||||
|
# 'important' - if this fails, set the overall state to 'fail'
|
||||||
|
return { fatal => 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
# vim: set sw=4 et:
|
@ -28,7 +28,12 @@ sub run {
|
|||||||
assert_screen "grub_fedup", 30;
|
assert_screen "grub_fedup", 30;
|
||||||
send_key "ret";
|
send_key "ret";
|
||||||
|
|
||||||
|
if (get_var('UPGRADE') eq "desktop") {
|
||||||
|
assert_screen "graphical_login", 6000;
|
||||||
|
#} elsif (get_var('UPGRADE' eq "minimal")) {
|
||||||
|
} else {
|
||||||
assert_screen "text_console_login", 6000;
|
assert_screen "text_console_login", 6000;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user