2020-12-10 12:30:59 +00:00
|
|
|
use base "anacondatest";
|
|
|
|
use strict;
|
|
|
|
use utils;
|
|
|
|
use testapi;
|
|
|
|
use anaconda;
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
|
|
# Go to INSTALLATION DESTINATION and ensure the disk is selected.
|
|
|
|
# Because PARTITIONING starts with 'custom_blivet', this will select blivet-gui.
|
|
|
|
select_disks();
|
|
|
|
assert_and_click "anaconda_spoke_done";
|
|
|
|
|
|
|
|
if (get_var("UEFI")) {
|
|
|
|
# if we're running on UEFI, let us reformat the UEFI first
|
Simplify blivet_btrfs_preserve_home, drop unneeded needles
There's no need to do all this 'check whether it's selected and
click it if not' stuff (for three different mount points). Just
always click it. If it's already selected, clicking it again
doesn't hurt (one of these stanzas even clicks it *even if it's
selected*!)
If we need to cover both cases, we just need two needles with
the same tag, we don't need separate code paths. In each case,
though, we actually haven't matched one of the needles for ages
(the most recent was part_boot_selected, but now we're using
GPT by default, we won't hit that any more as it'll be the BIOS
boot partition that's selected by default), so delete the needles
we aren't matching any more. If we *do* hit any case where we
need to handle the 'other' state, we can just add the alternative
needle with the same tag.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-04-29 00:05:37 +00:00
|
|
|
# Select the UEFI partition if it is not selected by default;
|
|
|
|
# if it is, clicking it is harmless
|
|
|
|
assert_and_click "anaconda_blivet_part_efi";
|
|
|
|
wait_still_screen 5;
|
2020-12-10 12:30:59 +00:00
|
|
|
|
|
|
|
# Go to the partition settings
|
|
|
|
assert_and_click "anaconda_blivet_part_edit";
|
|
|
|
# Select the Format option
|
|
|
|
assert_and_click "anaconda_blivet_part_format";
|
2023-04-28 22:51:47 +00:00
|
|
|
assert_and_click "anaconda_blivet_part_fs_select";
|
|
|
|
assert_and_click "anaconda_blivet_part_fs_efi_filesystem";
|
2020-12-10 12:30:59 +00:00
|
|
|
# Select the mountpoint field
|
|
|
|
|
|
|
|
send_key_until_needlematch("anaconda_blivet_mountpoint_selected", "tab", 3, 5);
|
|
|
|
# Fill in the mountpoint
|
|
|
|
type_very_safely "/boot/efi";
|
|
|
|
# Confirm the settings
|
|
|
|
assert_and_click "anaconda_blivet_part_format_button";
|
|
|
|
}
|
|
|
|
|
|
|
|
# Reformat the /boot partition
|
Simplify blivet_btrfs_preserve_home, drop unneeded needles
There's no need to do all this 'check whether it's selected and
click it if not' stuff (for three different mount points). Just
always click it. If it's already selected, clicking it again
doesn't hurt (one of these stanzas even clicks it *even if it's
selected*!)
If we need to cover both cases, we just need two needles with
the same tag, we don't need separate code paths. In each case,
though, we actually haven't matched one of the needles for ages
(the most recent was part_boot_selected, but now we're using
GPT by default, we won't hit that any more as it'll be the BIOS
boot partition that's selected by default), so delete the needles
we aren't matching any more. If we *do* hit any case where we
need to handle the 'other' state, we can just add the alternative
needle with the same tag.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-04-29 00:05:37 +00:00
|
|
|
assert_and_click "anaconda_blivet_part_boot";
|
|
|
|
wait_still_screen 5;
|
2020-12-10 12:30:59 +00:00
|
|
|
|
|
|
|
# Go to the partition settings
|
|
|
|
assert_and_click "anaconda_blivet_part_edit";
|
|
|
|
# Select the Format option
|
|
|
|
assert_and_click "anaconda_blivet_part_format";
|
2023-04-28 23:46:48 +00:00
|
|
|
assert_and_click "anaconda_blivet_part_fs_select";
|
|
|
|
assert_and_click "anaconda_blivet_part_fs_ext4";
|
2020-12-10 12:30:59 +00:00
|
|
|
# Select the mountpoint field
|
|
|
|
send_key_until_needlematch("anaconda_blivet_mountpoint_selected", "tab", 3, 5);
|
|
|
|
# Fill in the mountpoint
|
|
|
|
type_very_safely "/boot";
|
|
|
|
# Confirm the settings
|
|
|
|
assert_and_click "anaconda_blivet_part_format_button";
|
|
|
|
|
|
|
|
# Select the BTRFS part
|
|
|
|
assert_and_click "anaconda_blivet_volumes_icon";
|
|
|
|
|
|
|
|
# Select the home partition
|
Simplify blivet_btrfs_preserve_home, drop unneeded needles
There's no need to do all this 'check whether it's selected and
click it if not' stuff (for three different mount points). Just
always click it. If it's already selected, clicking it again
doesn't hurt (one of these stanzas even clicks it *even if it's
selected*!)
If we need to cover both cases, we just need two needles with
the same tag, we don't need separate code paths. In each case,
though, we actually haven't matched one of the needles for ages
(the most recent was part_boot_selected, but now we're using
GPT by default, we won't hit that any more as it'll be the BIOS
boot partition that's selected by default), so delete the needles
we aren't matching any more. If we *do* hit any case where we
need to handle the 'other' state, we can just add the alternative
needle with the same tag.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-04-29 00:05:37 +00:00
|
|
|
assert_and_click "anaconda_blivet_part_home";
|
2020-12-10 12:30:59 +00:00
|
|
|
# Go to the partition settings
|
|
|
|
assert_and_click "anaconda_blivet_part_edit";
|
|
|
|
# Select the Set mountpoint option
|
|
|
|
assert_and_click "anaconda_blivet_part_setmountpoint";
|
|
|
|
# Type the mountpoint
|
|
|
|
type_very_safely "/home";
|
|
|
|
# Confirm
|
|
|
|
assert_and_click "anaconda_blivet_part_setmountpoint_button";
|
|
|
|
# Wait some time for the pane to settle, without this,
|
|
|
|
# the needle boolean check will fade too fast without actually
|
|
|
|
# taking any effect.
|
|
|
|
sleep 5;
|
|
|
|
|
|
|
|
# While there are some root subvolumes (it seems that there can be more than one)
|
|
|
|
# continue to delete them.
|
|
|
|
while (check_screen "anaconda_blivet_part_root_exists", 2) {
|
|
|
|
assert_and_click "anaconda_blivet_part_root_exists";
|
|
|
|
assert_and_click "anaconda_blivet_part_delete";
|
|
|
|
assert_and_click "anaconda_blivet_btn_ok";
|
2022-07-28 20:32:57 +00:00
|
|
|
sleep 5;
|
2020-12-10 12:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Add new root partition
|
2021-08-11 19:15:46 +00:00
|
|
|
assert_and_click "anaconda_add";
|
2020-12-10 12:30:59 +00:00
|
|
|
# Select the name textfield
|
|
|
|
send_key_until_needlematch("anaconda_blivet_part_name_selected", "tab", 3, 5);
|
|
|
|
# type the new name
|
|
|
|
type_very_safely "newroot";
|
|
|
|
# Go to next field
|
|
|
|
send_key "tab";
|
|
|
|
# Type the mountpoint
|
|
|
|
type_very_safely "/";
|
|
|
|
# Confirm settings
|
|
|
|
assert_and_click "anaconda_blivet_btn_ok";
|
|
|
|
|
|
|
|
# Confirm everything and close the hub
|
|
|
|
assert_and_click "anaconda_spoke_done";
|
|
|
|
assert_and_click "anaconda_part_accept_changes";
|
|
|
|
|
|
|
|
# Anaconda hub
|
2022-07-28 20:32:57 +00:00
|
|
|
assert_screen "anaconda_main_hub", 300;
|
2020-12-10 12:30:59 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {fatal => 1};
|
2020-12-10 12:30:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|