merge DISK_GUIDED and DISK_CUSTOM into PARTITIONING

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D486
This commit is contained in:
Jan Sedlák 2015-08-06 11:02:18 +02:00
parent a18b6f8f69
commit 335ce280f3
2 changed files with 16 additions and 25 deletions

29
main.pm
View File

@ -93,23 +93,18 @@ else
autotest::loadtest get_var('CASEDIR')."/tests/_software_selection.pm";
## Disk partitioning.
# If DISK_CUSTOM or DISK_GUIDED is set, we pick the storage test
# If PARTITIONING is set, we pick the storage test
# to run based on the value (usually we run the test with the name
# that matches the value, except for a couple of commented cases).
my $storage = '';
if (get_var('DISK_CUSTOM')) {
$storage = get_var('CASEDIR')."/tests/disk_custom_".get_var('DISK_CUSTOM').".pm";
my $partitioning = get_var('PARTITIONING');
# if PARTITIONING is unset, or one of [...], use disk_guided_empty,
# which is the simplest / 'default' case.
if (! $partitioning || $partitioning ~~ ['guided_empty', 'guided_free_space']) {
$storage = get_var('CASEDIR')."/tests/disk_guided_empty.pm";
}
else {
my $disk_guided = get_var('DISK_GUIDED');
# if DISK_GUIDED is unset, or one of [...], use disk_guided_empty,
# which is the simplest / 'default' case.
if (! $disk_guided || $disk_guided ~~ ['empty', 'free_space']) {
$storage = get_var('CASEDIR')."/tests/disk_guided_empty.pm";
}
else {
$storage = get_var('CASEDIR')."/tests/disk_guided_".$disk_guided.".pm";
}
$storage = get_var('CASEDIR')."/tests/disk_".$partitioning.".pm";
}
autotest::loadtest $storage;
@ -140,14 +135,10 @@ else
# If there is a post-install test to verify storage configuration worked
# correctly, run it. Again we determine the test name based on the value
# of DISK_CUSTOM or DISK_GUIDED.
# of PARTITIONING
my $storagepost = '';
if (get_var('DISK_GUIDED')) {
my $loc = get_var('CASEDIR')."/tests/disk_guided_".get_var('DISK_GUIDED')."_postinstall.pm";
$storagepost = $loc if (-e $loc);
}
elsif (get_var('DISK_CUSTOM')) {
my $loc = get_var('CASEDIR')."/tests/disk_custom_".get_var('DISK_CUSTOM')."_postinstall.pm";
if (get_var('PARTITIONING')) {
my $loc = get_var('CASEDIR')."/tests/disk_".get_var('PARTITIONING')."_postinstall.pm";
$storagepost = $loc if (-e $loc);
}
autotest::loadtest $storagepost if ($storagepost);

View File

@ -275,7 +275,7 @@
name => "server_sata_multi",
prio => 2,
settings => [
{ key => "DISK_GUIDED", value => "multi" },
{ key => "PARTITIONING", value => "guided_multi" },
{ key => "HDDMODEL", value => "ide-hd,bus=ahci0.0" },
{ key => "NUMDISKS", value => "2" },
{ key => "HDD_2", value => "disk_full.img" },
@ -309,7 +309,7 @@
name => "server_delete_pata",
prio => 5,
settings => [
{ key => "DISK_GUIDED", value => "delete_all" },
{ key => "PARTITIONING", value => "guided_delete_all" },
{ key => "HDDMODEL", value => "ide-hd" },
{ key => "HDD_1", value => "disk_full.img" },
],
@ -343,7 +343,7 @@
name => "server_delete_partial",
prio => 9,
settings => [
{ key => "DISK_GUIDED", value => "delete_partial" },
{ key => "PARTITIONING", value => "guided_delete_partial" },
{ key => "HDD_1", value => "disk_full.img" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
],
@ -361,7 +361,7 @@
name => "server_simple_free_space",
prio => 11,
settings => [
{ key => "DISK_GUIDED", value => "free_space" },
{ key => "PARTITIONING", value => "guided_free_space" },
{ key => "HDD_1", value => "disk_freespace.img" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
],
@ -371,7 +371,7 @@
name => "server_multi_empty",
prio => 12,
settings => [
{ key => "DISK_GUIDED", value => "multi_empty_all" },
{ key => "PARTITIONING", value => "guided_multi_empty_all" },
{ key => "NUMDISKS", value => "2" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
],
@ -381,7 +381,7 @@
name => "server_software_raid",
prio => 13,
settings => [
{ key => "DISK_CUSTOM", value => "software_raid" },
{ key => "PARTITIONING", value => "custom_software_raid" },
{ key => "NUMDISKS", value => "2" },
{ key => "ROOT_PASSWORD", value => "weakpassword" },
],