summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 16:17:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-08 16:17:17 +0000
commitf679a6b10692729dbaa5248f1708e889143ed307 (patch)
tree3f51d40447e0d592122af5c6c03e8d4fdc041fc1
parent745c63e9a05b33e8399b3a9eb5ae8027fadc4093 (diff)
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
-rw-r--r--test/lib/envutil.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/lib/envutil.rb b/test/lib/envutil.rb
index 0fb26b0c52c..f6a6607ad80 100644
--- a/test/lib/envutil.rb
+++ b/test/lib/envutil.rb
@@ -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")