1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
nobu 2014-06-07 19:57:43 +00:00
parent 3538685812
commit 7d8fc3696e

View file

@ -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