Mailinglist Archive: yast-commit (883 mails)

< Previous Next >
[yast-commit] <rest-service> master : Add % to the percentage column
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Thu, 9 Jul 2009 15:35:49 +0200
  • Message-id: <E1MOtmz-0000Cw-VN@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit b0fb402c6825f928222bb4e75faf24f7b1b217be
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Thu Jul 9 15:35:49 2009 +0200

Add % to the percentage column
---
webservice/test/cover_all.rb | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/webservice/test/cover_all.rb b/webservice/test/cover_all.rb
index 34e93b6..a3cb901 100644
--- a/webservice/test/cover_all.rb
+++ b/webservice/test/cover_all.rb
@@ -14,6 +14,7 @@ def coverage_test dir = "."
Dir.chdir dir
puts "Coverage for #{dir}:"
coverage= Hash.new
+ task = nil
Dir.new("test").each do |f|
next if f[0,1] == "."
next if f[-1..-1] == "~"
@@ -32,10 +33,11 @@ def coverage_test dir = "."
percent = covs[-1].to_f
coverage[file] = percent unless coverage[file] && (coverage[file] >
percent)
end
- end rescue puts "*** No tests for #{dir}"
+ end rescue nil
+ puts "*** No tests for #{dir}" unless task
coverage.each do |file,percent|
next if percent > 99.0
- puts " %6.2f %-35s" % [percent, file]
+ puts " %6.2f%% %-35s" % [percent, file]
end
Dir.chdir wd
puts
--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages