From bafa7f90efe9138cf505776192603a49667c58a2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 27 Feb 2016 05:10:44 +0000 Subject: test/unit: refine output in job_status=normal * test/lib/test/unit.rb (Test::Unit::StatusLine#jobs_status): show status of only changed woker, not to show same lines repeatedly, in normal job_status mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/lib/test/unit.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'test/lib') diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index 419081a58f..d7163b2883 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -332,7 +332,6 @@ module Test # just only dots, ignore when /^okay$/ worker.status = :running - jobs_status when /^ready(!)?$/ bang = $1 worker.status = :ready @@ -345,7 +344,7 @@ module Test worker.run(task, type) @test_count += 1 - jobs_status + jobs_status(worker) when /^done (.+?)$/ begin r = Marshal.load($1.unpack("m")[0]) @@ -360,7 +359,7 @@ module Test when /^p (.+?)$/ del_jobs_status print $1.unpack("m")[0] - jobs_status if @options[:job_status] == :replace + jobs_status(worker) if @options[:job_status] == :replace when /^after (.+?)$/ @warnings << Marshal.load($1.unpack("m")[0]) when /^bye (.+?)$/ @@ -473,6 +472,7 @@ module Test end } end + del_status_line result end end @@ -546,9 +546,13 @@ module Test @status_line_size += line.size end - def jobs_status + def jobs_status(worker) return if !@options[:job_status] or @options[:verbose] - status_line = @workers.map(&:to_s).join(" ") + if @options[:job_status] == :replace + status_line = @workers.map(&:to_s).join(" ") + else + status_line = worker.to_s + end update_status(status_line) or (puts; nil) end @@ -606,7 +610,6 @@ module Test def new_test(s) @test_count += 1 - return if !@options[:job_status] or @options[:verbose] update_status(s) end -- cgit v1.2.3