summaryrefslogtreecommitdiff
path: root/bootstraptest
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-07 19:57:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-07 19:57:43 +0000
commit7d8fc3696ef8fa9f600d1943afe2f525debc5564 (patch)
tree452e9e8e7d903436540b9caf00fdf25d0c4c5673 /bootstraptest
parent3538685812ff43f87497b18ff22710f644161e25 (diff)
runner.rb: elapsed times
* bootstraptest/runner.rb (show_progress): show each elapsed times in verbose mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rwxr-xr-xbootstraptest/runner.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/bootstraptest/runner.rb b/bootstraptest/runner.rb
index 5fdfc42..5168464 100755
--- a/bootstraptest/runner.rb
+++ b/bootstraptest/runner.rb
@@ -207,14 +207,17 @@ def show_progress(message = '')
elsif @tty
$stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}"
end
+ t = Time.now if @verbose
faildesc, errout = with_stderr {yield}
+ t = Time.now - t if @verbose
if !faildesc
if @tty
$stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}"
+ elsif @verbose
+ $stderr.printf("%6.3f\n", t)
else
$stderr.print '.'
end
- $stderr.puts if @verbose
else
$stderr.print "#{@failed}F#{@reset}"
$stderr.puts if @verbose