Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jan 30, 2017
1 parent f8db7b5 commit 9de84b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/clients/wrapper_storage.rb
Expand Up @@ -10,6 +10,7 @@
module Yast
class WrapperStorageClient < Client
def main
puts "DEBUG: WrapperStorageClient.main"
@func = Convert.to_string(WFM.Args(0))
@param = []

Expand All @@ -26,7 +27,11 @@ def main
@param
)

puts "DEBUG: loading storage"
require "storage"
puts "DEBUG: importing"
Yast.import "Storage"
puts "DEBUG: Storage loaded"

# call the required function
case @func
Expand Down Expand Up @@ -56,6 +61,7 @@ def main
@ret = Storage.GetWinPrimPartitions(@param1)
end
when "ClassicStringToByte"
puts "DEBUG: ClassicStringToByte"
if Builtins.size(@param) == 0
Builtins.y2error("Missing argument for Storage::ClassicStringToByte()")
else
Expand Down
1 change: 1 addition & 0 deletions src/modules/SpaceCalculation.rb
Expand Up @@ -1093,6 +1093,7 @@ def btrfs_used_size(directory)
# where unit can be one of: "" (none) or "B", "KiB", "MiB", "GiB", "TiB", "PiB"
# @return [Integer] size in bytes
def size_from_string(size_str)
puts "DEBUG: size_from_string"
WFM.call("wrapper_storage", ["ClassicStringToByte", [size_str]])
end
end
Expand Down
4 changes: 4 additions & 0 deletions test/test_helper.rb
Expand Up @@ -12,6 +12,10 @@
RSpec.configure do |config|
config.extend Yast::I18n # available in context/describe
config.include Yast::I18n # available in it/let/before/...
config.after(:suite) do
system("cat /var/log/YaST2/y2log")
system("cat ~/.y2log")
end
end

if ENV["COVERAGE"]
Expand Down

0 comments on commit 9de84b2

Please sign in to comment.