Skip to content

Commit

Permalink
Merge pull request #71 from aschnell/master
Browse files Browse the repository at this point in the history
- added testcase
  • Loading branch information
aschnell committed May 19, 2014
2 parents 69fa338 + 25c8f4d commit b060e51
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -45,6 +45,7 @@ testsuite/site.*
testsuite/*.sum
testsuite/*.log
testsuite/tmp.*
testsuite/raw.tmp.*
testsuite/tmp
testsuite/yast2-storage.test
testsuite/run
Expand Down
9 changes: 6 additions & 3 deletions src/modules/Partitions.rb
Expand Up @@ -301,6 +301,7 @@ def BootCyl
@boot_cyl
end


def PrepBoot
ret = Arch.ppc &&
(Arch.board_chrp || Arch.board_prep || Arch.board_iseries)
Expand All @@ -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


Expand Down
11 changes: 6 additions & 5 deletions src/modules/StorageProposal.rb
Expand Up @@ -37,6 +37,10 @@
module Yast
class StorageProposalClass < Module


include Yast::Logger


def main

textdomain "storage"
Expand Down Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions testsuite/.cvsignore

This file was deleted.

Empty file.
28 changes: 28 additions & 0 deletions 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
34 changes: 34 additions & 0 deletions 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

0 comments on commit b060e51

Please sign in to comment.