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
This commit is contained in:
parent
de12196865
commit
bafa7f90ef
@ -332,7 +332,6 @@ module Test
|
|||||||
# just only dots, ignore
|
# just only dots, ignore
|
||||||
when /^okay$/
|
when /^okay$/
|
||||||
worker.status = :running
|
worker.status = :running
|
||||||
jobs_status
|
|
||||||
when /^ready(!)?$/
|
when /^ready(!)?$/
|
||||||
bang = $1
|
bang = $1
|
||||||
worker.status = :ready
|
worker.status = :ready
|
||||||
@ -345,7 +344,7 @@ module Test
|
|||||||
worker.run(task, type)
|
worker.run(task, type)
|
||||||
@test_count += 1
|
@test_count += 1
|
||||||
|
|
||||||
jobs_status
|
jobs_status(worker)
|
||||||
when /^done (.+?)$/
|
when /^done (.+?)$/
|
||||||
begin
|
begin
|
||||||
r = Marshal.load($1.unpack("m")[0])
|
r = Marshal.load($1.unpack("m")[0])
|
||||||
@ -360,7 +359,7 @@ module Test
|
|||||||
when /^p (.+?)$/
|
when /^p (.+?)$/
|
||||||
del_jobs_status
|
del_jobs_status
|
||||||
print $1.unpack("m")[0]
|
print $1.unpack("m")[0]
|
||||||
jobs_status if @options[:job_status] == :replace
|
jobs_status(worker) if @options[:job_status] == :replace
|
||||||
when /^after (.+?)$/
|
when /^after (.+?)$/
|
||||||
@warnings << Marshal.load($1.unpack("m")[0])
|
@warnings << Marshal.load($1.unpack("m")[0])
|
||||||
when /^bye (.+?)$/
|
when /^bye (.+?)$/
|
||||||
@ -473,6 +472,7 @@ module Test
|
|||||||
end
|
end
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
del_status_line
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -546,9 +546,13 @@ module Test
|
|||||||
@status_line_size += line.size
|
@status_line_size += line.size
|
||||||
end
|
end
|
||||||
|
|
||||||
def jobs_status
|
def jobs_status(worker)
|
||||||
return if !@options[:job_status] or @options[:verbose]
|
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)
|
update_status(status_line) or (puts; nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -606,7 +610,6 @@ module Test
|
|||||||
|
|
||||||
def new_test(s)
|
def new_test(s)
|
||||||
@test_count += 1
|
@test_count += 1
|
||||||
return if !@options[:job_status] or @options[:verbose]
|
|
||||||
update_status(s)
|
update_status(s)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user