Add to templates.

This commit is contained in:
Lukáš Růžička 2020-05-11 15:55:16 +02:00 committed by Adam Williamson
parent c42f62da14
commit 5f1db40ebe
12 changed files with 160 additions and 24 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 53,
"ypos": 285,
"width": 69,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"anaconda_part_select_efiboot"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 297,
"ypos": 329,
"width": 98,
"height": 19,
"type": "match"
}
],
"properties": [],
"tags": [
"anaconda_blivet_part_inactive_bootpart"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@ -0,0 +1,15 @@
{
"area": [
{
"width": 23,
"type": "match",
"height": 14,
"xpos": 710,
"ypos": 171
}
],
"properties": [],
"tags": [
"anaconda_blivet_part_inactive_root"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -1,14 +1,14 @@
{
"properties": [],
"tags": [
"anaconda_blivet_part_root_inactive"
"anaconda_blivet_part_inactive_root"
],
"area": [
{
"xpos": 559,
"xpos": 581,
"ypos": 186,
"width": 45,
"height": 16,
"width": 23,
"height": 18,
"type": "match"
}
]

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 517,
"ypos": 134,
"width": 129,
"height": 18,
"type": "match"
}
],
"properties": [],
"tags": [
"anaconda_blivet_part_select_efi"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -273,6 +273,7 @@
"flavor": "Workstation-live-iso",
"settings": {
"DESKTOP": "gnome",
"HDDSIZEGB": "20",
"LIVE": "1",
"PACKAGE_SET": "default",
"TEST_TARGET": "ISO"
@ -622,6 +623,34 @@
"START_AFTER_TEST": "install_default_upload"
}
},
"install_blivet_resize": {
"profiles": {
"fedora-Workstation-live-iso-x86_64-*-64bit": 30,
"fedora-Workstation-live-iso-x86_64-*-uefi": 30,
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30
},
"settings": {
"PARTITIONING": "custom_blivet_resize",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"ROOT_PASSWORD": "weakpassword",
"START_AFTER_TEST": "install_default_upload",
"INSTALL": "1"
}
},
"install_resize": {
"profiles": {
"fedora-Workstation-live-iso-x86_64-*-64bit": 30,
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 30,
"fedora-Workstation-live-iso-x86_64-*-uefi": 30
},
"settings": {
"PARTITIONING": "custom_resize",
"START_AFTER_TEST": "install_default_upload",
"HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2",
"INSTALL": "1",
"ROOT_PASSWORD": "weakpassword"
}
},
"desktop_browser": {
"profiles": {
"fedora-KDE-live-iso-x86_64-*-64bit": 22,
@ -886,8 +915,7 @@
"fedora-Server-boot-iso-x86_64-*-64bit": 10,
"fedora-Server-boot-iso-x86_64-*-uefi": 11,
"fedora-Server-dvd-iso-x86_64-*-uefi": 11,
"fedora-Silverblue-dvd_ostree-iso-x86_64-*-uefi": 51,
"fedora-Workstation-live-iso-x86_64-*-uefi": 11
"fedora-Silverblue-dvd_ostree-iso-x86_64-*-uefi": 51
},
"settings": {
"PACKAGE_SET": "default",
@ -905,7 +933,8 @@
"fedora-Silverblue-dvd_ostree-iso-ppc64le-*-ppc64le": 50,
"fedora-Silverblue-dvd_ostree-iso-x86_64-*-64bit": 50,
"fedora-Workstation-live-iso-ppc64le-*-ppc64le": 10,
"fedora-Workstation-live-iso-x86_64-*-64bit": 10
"fedora-Workstation-live-iso-x86_64-*-64bit": 10,
"fedora-Workstation-live-iso-x86_64-*-uefi": 10
},
"settings": {
"PACKAGE_SET": "default",

View File

@ -4,6 +4,21 @@ use testapi;
use anaconda;
use utils;
sub activate {
# This subroutine activates a partition in Blivet environment.
# Due to some failures on different architectures, probably caused by their
# slowliness, we will need to do the partition activation proces several
# times to make sure the proper partition gets activated.
my $partition = shift;
my $count = 12;
print("PARTITION VARIABLE: $partition");
while (check_screen "anaconda_blivet_part_inactive_$partition" and $count > 0) {
assert_and_click "anaconda_blivet_part_inactive_$partition";
sleep 5;
$count -= 1;
}
}
sub run {
my $self = shift;
# Navigate to "Installation destionation" and select blivet-gui
@ -18,29 +33,46 @@ sub run {
# which will be then followed through.
# Partitioning starts out of the LVM on VD1. We will use it to recreate
# the "/boot" partition in there.
# the "/boot" partition in there. In UEFI, we will need to deal with the /boot/efi
# partition first.
if (get_var("UEFI") == 1) {
#The efi partition should be already activated. So reformat it and remount.
custom_blivet_format_partition(type => 'efi', label => 'efiboot', mountpoint => '/boot/efi');
wait_still_screen 5;
}
# Select the boot partition and reformat it and remount.
activate("bootpart");
# Boot is the only ext4 partition on that scheme, so we will use that to make a needle.
wait_still_screen 5;
custom_blivet_format_partition(type => 'ext4', label => 'boot', mountpoint => '/boot');
wait_still_screen 5;
# Select the LVM root partition, resize it, and format it.
assert_and_click "anaconda_blivet_volumes_icon";
if (check_screen "anaconda_blivet_part_root_inactive") {
# If the root partition is not active, click on it to
# activate it.
assert_and_click "anaconda_blivet_part_root_inactive";
}
wait_still_screen 5;
# Activate root partition if not active already
activate("root");
custom_blivet_resize_partition(size => '13', units => 'GiB');
wait_still_screen 5;
# Now format the resized root partition
# Now format the resized root partition. It seems that the focus returns to the first
# partition in the view, so we need to activate this again before we attempt to do
# anything to the partition.
activate("root");
custom_blivet_format_partition(type => 'ext4', label => 'root', mountpoint => '/');
wait_still_screen 5;
# Select the newly created free space
assert_and_click "anaconda_blivet_free_space";
# Create a partition and format it.
custom_blivet_add_partition(filesystem => 'ext4', mountpoint => '/home');
wait_still_screen 5;
# Close the spoke.
assert_and_click "anaconda_spoke_done";
wait_still_screen 5;
# Confirm changes
assert_and_click "anaconda_part_accept_changes";

View File

@ -4,6 +4,15 @@ use testapi;
use anaconda;
use utils;
sub goto_mountpoint {
my $counter = 20;
while (!check_screen "anaconda_part_mountpoint_selected" and $counter > 0) {
send_key "tab";
$counter += 1;
sleep 1;
}
}
sub run {
my $self = shift;
# Navigate to "Installation destionation" and select blivet-gui
@ -26,24 +35,25 @@ sub run {
#
assert_and_click "anaconda_part_select_boot";
# navigate to "Mountpoint"
while (!check_screen "anaconda_part_mountpoint_selected") {
send_key "tab";
}
goto_mountpoint();
type_very_safely "/boot";
assert_and_click "anaconda_part_device_reformat";
assert_and_click "anaconda_part_update_settings";
# Then mount the Swap partition.
assert_and_click "anaconda_part_select_swap";
assert_and_click "anaconda_part_device_reformat";
assert_and_click "anaconda_part_update_settings";
# For UEFI based images, we need to reassign the efi boot
# mountpoint as well
if (get_var("UEFI") == 1) {
assert_and_click "anaconda_part_select_efiboot";
goto_mountpoint();
type_very_safely "/boot/efi";
assert_and_click "anaconda_part_device_reformat";
assert_and_click "anaconda_part_update_settings";
}
# Now resize and format the current root partition
assert_and_click "anaconda_part_select_root";
# Navigate to Mountpoint
while (!check_screen "anaconda_part_mountpoint_selected") {
send_key "tab";
}
goto_mountpoint();
type_very_safely "/";
# Skip to the Size window
send_key "tab";
@ -63,6 +73,11 @@ sub run {
send_key "tab";
assert_and_click "anaconda_part_add_mountpoint";
# Then mount the Swap partition.
assert_and_click "anaconda_part_select_swap";
assert_and_click "anaconda_part_device_reformat";
assert_and_click "anaconda_part_update_settings";
# Close the spoke.
assert_and_click "anaconda_spoke_done";