diff --git a/.gitignore b/.gitignore index e36170779..18e3e9c56 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ testsuite/site.* testsuite/*.sum testsuite/*.log testsuite/tmp.* +testsuite/raw.tmp.* testsuite/tmp testsuite/yast2-storage.test testsuite/run diff --git a/src/modules/Partitions.rb b/src/modules/Partitions.rb index a5daf40db..633a9a8f9 100644 --- a/src/modules/Partitions.rb +++ b/src/modules/Partitions.rb @@ -301,6 +301,7 @@ def BootCyl @boot_cyl end + def PrepBoot ret = Arch.ppc && (Arch.board_chrp || Arch.board_prep || Arch.board_iseries) @@ -311,9 +312,11 @@ def PrepBoot ret end - def BootPrimary - ret = PrepBoot() - ret + + # @return [boolean] true iff the boot partition must be a primary partition + # (with MSDOS disk label) + def BootPrimary() + return PrepBoot() end diff --git a/src/modules/StorageProposal.rb b/src/modules/StorageProposal.rb index 890b917d1..90d61b443 100644 --- a/src/modules/StorageProposal.rb +++ b/src/modules/StorageProposal.rb @@ -37,6 +37,10 @@ module Yast class StorageProposalClass < Module + + include Yast::Logger + + def main textdomain "storage" @@ -4125,11 +4129,8 @@ def special_boot_proposal_prepare(partitions) end deep_copy(p) end - Builtins.y2milestone( - "special_boot_proposal_prepare part:%1", - partitions - ) - Builtins.y2milestone("special_boot_proposal_prepare ret:%1", ret) + log.info("special_boot_proposal_prepare part:#{partitions}") + log.info("special_boot_proposal_prepare ret:#{ret}") end deep_copy(ret) end diff --git a/testsuite/.cvsignore b/testsuite/.cvsignore deleted file mode 100644 index 24f1e26b5..000000000 --- a/testsuite/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -Makefile -Makefile.in -site.exp -*.sum -*.log -tmp.out* -tmp.err* -tmp.log* -config -run -*.test diff --git a/testsuite/tests/empty-ppc64le3.err b/testsuite/tests/empty-ppc64le3.err new file mode 100644 index 000000000..e69de29bb diff --git a/testsuite/tests/empty-ppc64le3.out b/testsuite/tests/empty-ppc64le3.out new file mode 100644 index 000000000..85c49274f --- /dev/null +++ b/testsuite/tests/empty-ppc64le3.out @@ -0,0 +1,28 @@ +Dump Proposal: +Dump Create PPC PReP volume /dev/sda1 (7.84 MiB) +Dump Create volume /dev/sda2 (298.08 GiB) +Dump Create volume group system (298.07 GiB) from /dev/sda2 [destructive] +Dump Create logical volume /dev/system/home (50.00 GiB) for /home with xfs +Dump Create root volume /dev/system/root (20.00 GiB) with btrfs +Dump Create swap logical volume /dev/system/swap (768.00 MiB) +Dump Create subvolume boot/grub2/power-ieee1275 on device /dev/system/root +Dump Create subvolume opt on device /dev/system/root +Dump Create subvolume srv on device /dev/system/root +Dump Create subvolume tmp on device /dev/system/root +Dump Create subvolume usr/local on device /dev/system/root +Dump Create subvolume var/crash on device /dev/system/root +Dump Create subvolume var/lib/mailman on device /dev/system/root +Dump Create subvolume var/lib/named on device /dev/system/root +Dump Create subvolume var/lib/pgqsl on device /dev/system/root +Dump Create subvolume var/log on device /dev/system/root +Dump Create subvolume var/opt on device /dev/system/root +Dump Create subvolume var/spool on device /dev/system/root +Dump Create subvolume var/tmp on device /dev/system/root +Dump +Dump Target Map Excerpt: +Dump device:/dev/sda label:msdos +Dump device:/dev/sda1 fsid:0x41 +Dump device:/dev/sda2 fsid:0x8e +Dump device:/dev/system/root userdata:{"/"=>"snapshots"} +Dump device:/dev/system/swap +Dump device:/dev/system/home diff --git a/testsuite/tests/empty-ppc64le3.rb b/testsuite/tests/empty-ppc64le3.rb new file mode 100644 index 000000000..2bc1c02c8 --- /dev/null +++ b/testsuite/tests/empty-ppc64le3.rb @@ -0,0 +1,34 @@ +# encoding: utf-8 + +# testedfiles: helper.rb + +module Yast + + class TestClient < Client + + def main + + def setup1() + setup_system("empty-ppc64le") + end + + def setup2() + ProductFeatures.SetBooleanFeature("partitioning", "try_separate_home", true) + ProductFeatures.SetBooleanFeature("partitioning", "proposal_lvm", true) + ProductFeatures.SetStringFeature("partitioning", "vm_desired_size", "30 GB") + ProductFeatures.SetStringFeature("partitioning", "root_base_size", "20 GB") + ProductFeatures.SetBooleanFeature("partitioning", "proposal_snapshots", true) + end + + def setup3() + end + + Yast.include self, "helper.rb" + + end + + end + +end + +Yast::TestClient.new.main