mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-24 14:53:09 +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;
|
||||
}
|
||||
|
||||
sub boot_and_login {
|
||||
sub boot_to_login_screen {
|
||||
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 {
|
||||
|
4
main.pm
4
main.pm
@ -57,8 +57,8 @@ if (get_var("ENTRYPOINT"))
|
||||
}
|
||||
elsif (get_var("UPGRADE"))
|
||||
{
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_preinstall_".get_var("UPGRADE").".pm";
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_run_".get_var("UPGRADE").".pm";
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_preinstall.pm";
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_run.pm";
|
||||
autotest::loadtest get_var('CASEDIR')."/tests/upgrade_postinstall_".get_var("UPGRADE").".pm";
|
||||
}
|
||||
else
|
||||
|
@ -1,17 +1,18 @@
|
||||
{
|
||||
"tags": [
|
||||
"ENV-DESKTOP-gnome",
|
||||
"graphical_login",
|
||||
"ENV-DISTRI-fedora",
|
||||
"ENV-INSTLANG-en_US",
|
||||
"graphical_login"
|
||||
"ENV-FLAVOR-develop"
|
||||
],
|
||||
"properties": [],
|
||||
"area": [
|
||||
{
|
||||
"xpos": 335,
|
||||
"ypos": 423,
|
||||
"width": 67,
|
||||
"height": 12,
|
||||
"type": "match"
|
||||
"width": 206,
|
||||
"type": "match",
|
||||
"xpos": 405,
|
||||
"height": 106,
|
||||
"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": [
|
||||
"ENV-DESKTOP-default",
|
||||
"text_console_login",
|
||||
"ENV-DISTRI-fedora",
|
||||
"ENV-INSTLANG-en_US",
|
||||
"text_console_login"
|
||||
"ENV-FLAVOR-develop"
|
||||
],
|
||||
"properties": [],
|
||||
"area": [
|
||||
{
|
||||
"width": 128,
|
||||
"xpos": 0,
|
||||
"type": "match",
|
||||
"ypos": 49,
|
||||
"width": 140,
|
||||
"height": 50,
|
||||
"type": "match"
|
||||
"height": 30
|
||||
}
|
||||
]
|
||||
}
|
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" },
|
||||
},
|
||||
{
|
||||
machine => { name => "64bit" },
|
||||
product => {
|
||||
arch => "x86_64",
|
||||
distri => "fedora",
|
||||
flavor => "universal",
|
||||
version => "*",
|
||||
},
|
||||
test_suite => { name => "fedup_desktop" },
|
||||
},
|
||||
],
|
||||
Machines => [
|
||||
{
|
||||
@ -397,10 +407,21 @@
|
||||
settings => [
|
||||
{ key => "ROOT_PASSWORD", value => "weakpassword" },
|
||||
{ key => "BOOTFROM", value => "c" },
|
||||
{ key => "HDD_1", value => "disk_f21.img" },
|
||||
{ key => "HDD_1", value => "disk_f21_minimal.img" },
|
||||
{ key => "UPGRADE", value => "minimal" },
|
||||
],
|
||||
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 testapi;
|
||||
|
||||
|
||||
sub run {
|
||||
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";
|
||||
|
||||
assert_screen "console_command_success", 1800;
|
||||
|
||||
type_string "reboot";
|
||||
assert_screen "graphical_login_input";
|
||||
type_string $password;
|
||||
send_key "ret";
|
||||
|
||||
$self->boot_and_login();
|
||||
|
||||
type_string 'yum -y install fedup; echo $?';
|
||||
send_key "ret";
|
||||
|
||||
assert_screen "console_command_success", 1800;
|
||||
assert_screen "graphical_desktop_clean", 30;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,8 @@ use testapi;
|
||||
sub run {
|
||||
my $self = shift;
|
||||
|
||||
$self->boot_and_login();
|
||||
$self->boot_to_login_screen();
|
||||
$self->login_as_root(3);
|
||||
|
||||
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,8 +28,13 @@ sub run {
|
||||
assert_screen "grub_fedup", 30;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub test_flags {
|
Loading…
Reference in New Issue
Block a user