envutil.rb: assert stderr if marshal failed
* test/ruby/envutil.rb (assert_separately): force to assert stderr to be empty if marshal failed, as something is emitted probably. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
fd7dc1b6ea
commit
12bf1de1dd
@ -298,7 +298,11 @@ eom
|
|||||||
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
|
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
|
||||||
assert(!abort, FailDesc[status, stderr])
|
assert(!abort, FailDesc[status, stderr])
|
||||||
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
|
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
|
||||||
res = Marshal.load(stdout.unpack("m")[0])
|
begin
|
||||||
|
res = Marshal.load(stdout.unpack("m")[0])
|
||||||
|
rescue => marshal_error
|
||||||
|
ignore_stderr = nil
|
||||||
|
end
|
||||||
if res
|
if res
|
||||||
res.backtrace.each do |l|
|
res.backtrace.each do |l|
|
||||||
l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"}
|
l.sub!(/\A-:(\d+)/){"#{file}:#{line + $1.to_i}"}
|
||||||
@ -312,6 +316,7 @@ eom
|
|||||||
assert_equal("", stderr, "assert_separately failed with error message")
|
assert_equal("", stderr, "assert_separately failed with error message")
|
||||||
end
|
end
|
||||||
assert_equal(0, status, "assert_separately failed: '#{stderr}'")
|
assert_equal(0, status, "assert_separately failed: '#{stderr}'")
|
||||||
|
raise marshal_error if marshal_error
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_warning(pat, msg = nil)
|
def assert_warning(pat, msg = nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user