Modify "install_multi" test for PowerPC

PowerPC arches have the empty disk automatically
mounted on the second position in anaconda (vdb).
Thus, trig installation on second disk.
Change disk checking to point on correct disk.

Warning: this is a workaround specific correction
addressing a specific case.
This will have to be improved/changed with a more
generic code as suggested by Adam Williamson in
https://pagure.io/fedora-qa/os-autoinst-distri-fedora/pull-request/1#comment-31858
proposal for a next commit :)

Signed-off-by: Guy Menanteau <menantea@linux.vnet.ibm.com>
Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
This commit is contained in:
Guy Menanteau 2017-02-21 10:57:55 -05:00 committed by Michel Normand
parent 6659e264b7
commit 9c8a4949fa
2 changed files with 18 additions and 5 deletions

View File

@ -33,10 +33,17 @@ sub select_disks {
assert_and_click "anaconda_main_hub_install_destination";
if (get_var('NUMDISKS') > 1) {
# Multi-disk case. Select however many disks the test needs. If
# $disks is 0, this will do nothing, and 0 disks will be selected.
for my $n (1 .. $args{disks}) {
assert_and_click "anaconda_install_destination_select_disk_$n";
if (get_var('OFW') && ($args{disks} == 1)) {
# we want to select only one disk
# for PowerPC this must be the second one that is empty.
assert_and_click "anaconda_install_destination_select_disk_2";
}
else {
# Multi-disk case. Select however many disks the test needs. If
# $disks is 0, this will do nothing, and 0 disks will be selected.
for my $n (1 .. $args{disks}) {
assert_and_click "anaconda_install_destination_select_disk_$n";
}
}
}
else {

View File

@ -5,7 +5,13 @@ use testapi;
sub run {
assert_screen "root_console";
# check that second disk is intact
assert_script_run 'mount /dev/vdb1 /mnt';
if (get_var('OFW')) {
# on PowerPC, installation disk is second disk (vdb)
# so need to check vda
assert_script_run 'mount /dev/vda1 /mnt';
} else {
assert_script_run 'mount /dev/vdb1 /mnt';
}
validate_script_output 'cat /mnt/testfile', sub { $_ =~ m/Hello, world!/ };
}