2020-05-11 08:23:00 +00:00
|
|
|
use base "anacondatest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use anaconda;
|
|
|
|
use utils;
|
|
|
|
|
2020-05-11 13:55:16 +00:00
|
|
|
sub goto_mountpoint {
|
2020-12-03 11:17:31 +00:00
|
|
|
send_key_until_needlematch("anaconda_part_mountpoint_selected", "tab", 20);
|
2020-05-11 13:55:16 +00:00
|
|
|
}
|
|
|
|
|
2020-05-11 08:23:00 +00:00
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
2022-07-28 20:32:57 +00:00
|
|
|
# Navigate to "Installation destionation" and select blivet-gui
|
2020-05-11 08:23:00 +00:00
|
|
|
# to manipulate the partitions. This will be automatically
|
|
|
|
# done using the following method, because PARTITIONING starts
|
|
|
|
# with "custom_blivet".
|
|
|
|
select_disks();
|
|
|
|
assert_and_click "anaconda_spoke_done";
|
|
|
|
|
|
|
|
# The following procedure will use Custom Partitioning to resize the root partition from
|
|
|
|
# a previous Linux installation and prepare the disk for new installation
|
|
|
|
# which will be then followed through.
|
|
|
|
|
2022-07-28 20:32:57 +00:00
|
|
|
# Custom partitioning shows that an existing installations is there on the disk,
|
2020-05-11 08:23:00 +00:00
|
|
|
# we need to select it to proceed.
|
|
|
|
assert_and_click "anaconda_part_use_current";
|
|
|
|
|
|
|
|
# At first, we will recreate the /boot mountpoint in the existing installation
|
|
|
|
# and reformat it.
|
|
|
|
#
|
|
|
|
assert_and_click "anaconda_part_select_boot";
|
|
|
|
# navigate to "Mountpoint"
|
2020-05-11 13:55:16 +00:00
|
|
|
goto_mountpoint();
|
2020-05-11 08:23:00 +00:00
|
|
|
type_very_safely "/boot";
|
|
|
|
assert_and_click "anaconda_part_device_reformat";
|
|
|
|
assert_and_click "anaconda_part_update_settings";
|
2020-12-04 22:57:04 +00:00
|
|
|
# give it a few seconds to update
|
|
|
|
wait_still_screen 5;
|
2020-05-11 08:23:00 +00:00
|
|
|
|
2020-05-11 13:55:16 +00:00
|
|
|
# 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";
|
2020-10-07 21:52:49 +00:00
|
|
|
# give it a second or two to update
|
2020-12-04 22:57:04 +00:00
|
|
|
wait_still_screen 5;
|
2020-05-11 13:55:16 +00:00
|
|
|
}
|
2020-05-11 08:23:00 +00:00
|
|
|
|
|
|
|
# Now resize and format the current root partition
|
|
|
|
assert_and_click "anaconda_part_select_root";
|
|
|
|
# Navigate to Mountpoint
|
2020-05-11 13:55:16 +00:00
|
|
|
goto_mountpoint();
|
2020-05-11 08:23:00 +00:00
|
|
|
type_very_safely "/";
|
|
|
|
# Skip to the Size window
|
|
|
|
send_key "tab";
|
|
|
|
type_very_safely "13 GiB";
|
|
|
|
# Reformat and update the partition
|
|
|
|
assert_and_click "anaconda_part_device_reformat";
|
|
|
|
assert_and_click "anaconda_part_update_settings";
|
2020-10-07 21:52:49 +00:00
|
|
|
# give it a second or two to update
|
|
|
|
wait_still_screen 2;
|
2021-06-22 10:38:26 +00:00
|
|
|
# Check that the partition has been resized for 13GiB
|
|
|
|
assert_screen "device_root_resized_thirteen";
|
2020-05-11 08:23:00 +00:00
|
|
|
|
|
|
|
# Add new /home partition into the emptied space.
|
2021-08-11 19:15:46 +00:00
|
|
|
assert_and_click "anaconda_add";
|
2020-05-11 08:23:00 +00:00
|
|
|
|
|
|
|
# The previous step brings us into a mountpoint field
|
|
|
|
# of the pop-up window, so we only need to fill the value in.
|
|
|
|
# Also, it seems that leaving the size field empty automatically
|
|
|
|
# suggests to use the remaining free space.
|
|
|
|
type_very_safely "/home";
|
|
|
|
send_key "tab";
|
|
|
|
assert_and_click "anaconda_part_add_mountpoint";
|
|
|
|
|
|
|
|
# Close the spoke.
|
|
|
|
assert_and_click "anaconda_spoke_done";
|
|
|
|
|
|
|
|
# Confirm changes
|
|
|
|
assert_and_click "anaconda_part_accept_changes";
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {fatal => 1};
|
2020-05-11 08:23:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|