mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
envutil.rb: improve message
* test/lib/envutil.rb (assert_ruby_status): show also outputs at normal exit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
745c63e9a0
commit
f679a6b106
1 changed files with 4 additions and 2 deletions
|
@ -328,6 +328,7 @@ module Test
|
|||
full_message << message << "\n"
|
||||
end
|
||||
full_message << "pid #{pid}"
|
||||
full_message << " exit #{status.exitstatus}" if status.exited?
|
||||
full_message << " killed by #{sigdesc}" if sigdesc
|
||||
if out and !out.empty?
|
||||
full_message << "\n#{out.b.gsub(/^/, '| ')}"
|
||||
|
@ -370,9 +371,10 @@ module Test
|
|||
|
||||
def assert_ruby_status(args, test_stdin="", message=nil, **opt)
|
||||
out, _, status = EnvUtil.invoke_ruby(args, test_stdin, true, :merge_to_stdout, **opt)
|
||||
assert(!status.signaled?, FailDesc[status, message, out])
|
||||
desc = FailDesc[status, message, out]
|
||||
assert(!status.signaled?, desc)
|
||||
message ||= "ruby exit status is not success:"
|
||||
assert(status.success?, "#{message} (#{status.inspect})")
|
||||
assert(status.success?, desc)
|
||||
end
|
||||
|
||||
ABORT_SIGNALS = Signal.list.values_at(*%w"ILL ABRT BUS SEGV TERM")
|
||||
|
|
Loading…
Add table
Reference in a new issue