diff --git a/lib/anaconda.pm b/lib/anaconda.pm index 6884cd66..195fd7c5 100644 --- a/lib/anaconda.pm +++ b/lib/anaconda.pm @@ -212,18 +212,6 @@ sub custom_add_partition { assert_screen "anaconda_custom_btn_add_mountpoint"; send_key "spc"; -# if ($args{raid1}) { -# # for RAID1, two disks should be selected -# send_key "tab"; -# send_key "down"; -# send_key "spc"; -# assert_screen "anaconda_custom_vdb_selected"; -# -# assert_and_click "anaconda_custom_raidlevel_select"; -# mouse_set(10, 10); -# assert_and_click "anaconda_custom_raidlevel_raid1"; -# } - # if no devicetype was specified or devicetype is already selected, do nothing if (($args{devicetype} && !check_screen("anaconda_custom_part_fs_$args{devicetype}_selected", 5))) { # send 'tab' until the Device Type dropdown is selected @@ -242,6 +230,17 @@ sub custom_add_partition { send_key_until_needlematch("anaconda_custom_part_fs_$args{filesystem}_selected", "down"); send_key "spc"; } + if ($args{raid1}) { + # send 'tab' until Raid Level dropdown is selected + send_key_until_needlematch("anaconda_custom_part_raidlevel_selected", "tab"); + send_key "spc"; + #choose RAID level from dropdown + # needle name specified like this is interpreted as "anaconda_custom_part_raid__selected" + #send_key_until_needlematch("anaconda_custom_part_raid_$args{raidl}_selected", "down"); + send_key_until_needlematch("anaconda_custom_part_raid_1_selected", "down"); + send_key "spc"; + } + # select "free space" in custom-gui if it exists, so we could run this function again to add another partition if (check_screen("anaconda_custom_free_space", 15)) { assert_and_click "anaconda_custom_free_space"; diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_devicetype_raid-20211012T.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_devicetype_raid-20211012T.json new file mode 100644 index 00000000..a2bd8667 --- /dev/null +++ b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_devicetype_raid-20211012T.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "xpos": 511, + "ypos": 330, + "width": 33, + "height": 10, + "type": "match" + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "anaconda_custom_part_devicetype_raid" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_devicetype_raid-20211012T.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_devicetype_raid-20211012T.png new file mode 100644 index 00000000..6c9622dc Binary files /dev/null and b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_devicetype_raid-20211012T.png differ diff --git a/needles/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.json similarity index 100% rename from needles/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.json rename to needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.json diff --git a/needles/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.png similarity index 100% rename from needles/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.png rename to needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_efi_filesystem_selected-20211010.png diff --git a/needles/rocky-anaconda_custom_part_fs_ext4_selected-20211010.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_ext4_selected-20211010.json similarity index 100% rename from needles/rocky-anaconda_custom_part_fs_ext4_selected-20211010.json rename to needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_ext4_selected-20211010.json diff --git a/needles/rocky-anaconda_custom_part_fs_ext4_selected-20211010.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_ext4_selected-20211010.png similarity index 100% rename from needles/rocky-anaconda_custom_part_fs_ext4_selected-20211010.png rename to needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_ext4_selected-20211010.png diff --git a/needles/rocky-anaconda_custom_part_fs_swap_selected-20211010.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_swap_selected-20211010.json similarity index 100% rename from needles/rocky-anaconda_custom_part_fs_swap_selected-20211010.json rename to needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_swap_selected-20211010.json diff --git a/needles/rocky-anaconda_custom_part_fs_swap_selected-20211010.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_swap_selected-20211010.png similarity index 100% rename from needles/rocky-anaconda_custom_part_fs_swap_selected-20211010.png rename to needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_fs_swap_selected-20211010.png diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_1_selected-20211021.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_1_selected-20211021.json new file mode 100644 index 00000000..69a1ade0 --- /dev/null +++ b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_1_selected-20211021.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "xpos": 779, + "ypos": 304, + "width": 40, + "height": 14, + "type": "match" + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "anaconda_custom_part_raid_1_selected" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_1_selected-20211021.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_1_selected-20211021.png new file mode 100644 index 00000000..8dafb7e4 Binary files /dev/null and b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_1_selected-20211021.png differ diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_4_selected-20211021.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_4_selected-20211021.json new file mode 100644 index 00000000..cd405ad3 --- /dev/null +++ b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_4_selected-20211021.json @@ -0,0 +1,17 @@ +{ + "area": [ + { + "xpos": 775, + "ypos": 335, + "width": 45, + "height": 10, + "type": "match" + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "anaconda_custom_part_raid_4_selected" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_4_selected-20211021.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_4_selected-20211021.png new file mode 100644 index 00000000..76bb1351 Binary files /dev/null and b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raid_4_selected-20211021.png differ diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raidlevel_selected-20211021.json b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raidlevel_selected-20211021.json new file mode 100644 index 00000000..c84a9c72 --- /dev/null +++ b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raidlevel_selected-20211021.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "height": 26, + "width": 66, + "xpos": 773, + "type": "match", + "ypos": 276, + "match": 98 + } + ], + "properties": [], + "tags": [ + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "anaconda_custom_part_raidlevel_selected" + ] +} \ No newline at end of file diff --git a/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raidlevel_selected-20211021.png b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raidlevel_selected-20211021.png new file mode 100644 index 00000000..1bf06b55 Binary files /dev/null and b/needles/anaconda/partitioning/custom-gui/rocky-anaconda_custom_part_raidlevel_selected-20211021.png differ diff --git a/templates.fif.json b/templates.fif.json index 141c8b90..6d9489dd 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -399,7 +399,7 @@ "ROOT_PASSWORD": "weakpassword" } }, - "install_blivet_software_raid": { + "install_custom_gui_software_raid": { "profiles": { "rocky-universal-aarch64-*-aarch64": 40, "rocky-universal-x86_64-*-64bit": 40, @@ -407,7 +407,7 @@ }, "settings": { "NUMDISKS": "2", - "PARTITIONING": "custom_blivet_software_raid", + "PARTITIONING": "custom_gui_software_raid", "POSTINSTALL": "disk_custom_software_raid_postinstall", "ROOT_PASSWORD": "weakpassword" } diff --git a/tests/disk_custom_gui_software_raid.pm b/tests/disk_custom_gui_software_raid.pm new file mode 100644 index 00000000..211a6422 --- /dev/null +++ b/tests/disk_custom_gui_software_raid.pm @@ -0,0 +1,39 @@ +use base "anacondatest"; +use strict; +use testapi; +use anaconda; + +sub run { + my $self = shift; + # Go to INSTALLATION DESTINATION and ensure two disks are selected. + # Because PARTITIONING starts with 'custom', this will select blivet-gui. + select_disks(disks=>2); + assert_and_click "anaconda_spoke_done"; + + if (get_var("UEFI")) { + # if we're running on UEFI, we need esp + custom_add_partition(size => 512, mountpoint => '/boot/efi', filesystem => 'efi_filesystem'); + } + if (get_var("OFW")) { + custom_add_partition(size => 4, filesystem => 'ppc_prep_boot'); + } + + custom_add_partition(size => 512, mountpoint => '/boot'); + custom_add_partition(filesystem => 'swap', size => 512, mountpoint => 'swap'); + custom_add_partition(raidl => 1, mountpoint => '/', devicetype => 'raid'); + + assert_and_click "anaconda_spoke_done"; + assert_and_click "anaconda_part_accept_changes"; + + # Anaconda hub + assert_screen "anaconda_main_hub", 300; # + +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: