diff --git a/needles/anaconda/partitioning/anaconda_part_select_efiboot.json b/needles/anaconda/partitioning/anaconda_part_select_efiboot.json new file mode 100644 index 00000000..123d71f6 --- /dev/null +++ b/needles/anaconda/partitioning/anaconda_part_select_efiboot.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 53, + "ypos": 285, + "width": 69, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_part_select_efiboot" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/anaconda_part_select_efiboot.png b/needles/anaconda/partitioning/anaconda_part_select_efiboot.png new file mode 100644 index 00000000..1fbdb1a1 Binary files /dev/null and b/needles/anaconda/partitioning/anaconda_part_select_efiboot.png differ diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_inactive_boot.json b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_inactive_boot.json new file mode 100644 index 00000000..60fd9153 --- /dev/null +++ b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_inactive_boot.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 297, + "ypos": 329, + "width": 98, + "height": 19, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_blivet_part_inactive_bootpart" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_inactive_boot.png b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_inactive_boot.png new file mode 100644 index 00000000..6f4788ea Binary files /dev/null and b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_inactive_boot.png differ diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive-20200514.json b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive-20200514.json new file mode 100644 index 00000000..84dc2f02 --- /dev/null +++ b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive-20200514.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "width": 23, + "type": "match", + "height": 14, + "xpos": 710, + "ypos": 171 + } + ], + "properties": [], + "tags": [ + "anaconda_blivet_part_inactive_root" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive-20200514.png b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive-20200514.png new file mode 100644 index 00000000..7b3c7c99 Binary files /dev/null and b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive-20200514.png differ diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive.json b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive.json index 9e9912b3..b70f37f5 100644 --- a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive.json +++ b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_root_inactive.json @@ -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" } ] diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_select_efi.json b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_select_efi.json new file mode 100644 index 00000000..1fc43f30 --- /dev/null +++ b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_select_efi.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 517, + "ypos": 134, + "width": 129, + "height": 18, + "type": "match" + } + ], + "properties": [], + "tags": [ + "anaconda_blivet_part_select_efi" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/blivet/anaconda_blivet_part_select_efi.png b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_select_efi.png new file mode 100644 index 00000000..4bc780fd Binary files /dev/null and b/needles/anaconda/partitioning/blivet/anaconda_blivet_part_select_efi.png differ diff --git a/templates.fif.json b/templates.fif.json index 033f3d52..960ce115 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -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", diff --git a/tests/disk_custom_blivet_resize.pm b/tests/disk_custom_blivet_resize.pm index f978538c..b1ec032d 100644 --- a/tests/disk_custom_blivet_resize.pm +++ b/tests/disk_custom_blivet_resize.pm @@ -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"; diff --git a/tests/disk_custom_resize.pm b/tests/disk_custom_resize.pm index 2f995650..31c3c4ea 100644 --- a/tests/disk_custom_resize.pm +++ b/tests/disk_custom_resize.pm @@ -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";