mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add separated assertion count
This commit is contained in:
parent
739fdb7ff0
commit
f1c230f18b
1 changed files with 10 additions and 9 deletions
|
@ -131,20 +131,21 @@ eom
|
||||||
args = args.dup
|
args = args.dup
|
||||||
args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"})
|
args.insert((Hash === args.first ? 1 : 0), "-w", "--disable=gems", *$:.map {|l| "-I#{l}"})
|
||||||
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, true, true, **opt)
|
stdout, stderr, status = EnvUtil.invoke_ruby(args, src, true, true, **opt)
|
||||||
|
if res_c
|
||||||
|
res_c.close
|
||||||
|
res = res_p.read
|
||||||
|
res_p.close
|
||||||
|
else
|
||||||
|
res = stdout
|
||||||
|
end
|
||||||
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
|
abort = status.coredump? || (status.signaled? && ABORT_SIGNALS.include?(status.termsig))
|
||||||
assert(!abort, FailDesc[status, nil, stderr])
|
assert(!abort, FailDesc[status, nil, stderr])
|
||||||
self._assertions += stdout[/^assertions=(\d+)/, 1].to_i
|
self._assertions += res[/^assertions=(\d+)/, 1].to_i
|
||||||
begin
|
begin
|
||||||
if res_c
|
res = Marshal.load(res.unpack1("m"))
|
||||||
res_c.close
|
|
||||||
MiniTest::Unit.output.print stdout
|
|
||||||
res = Marshal.load(res_p.read.unpack("m")[0])
|
|
||||||
res_p.close
|
|
||||||
else
|
|
||||||
res = Marshal.load(stdout.unpack("m")[0])
|
|
||||||
end
|
|
||||||
rescue => marshal_error
|
rescue => marshal_error
|
||||||
ignore_stderr = nil
|
ignore_stderr = nil
|
||||||
|
res = nil
|
||||||
end
|
end
|
||||||
if res
|
if res
|
||||||
if bt = res.backtrace
|
if bt = res.backtrace
|
||||||
|
|
Loading…
Reference in a new issue