mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test/lib/test/unit/assertions.rb (assert_in_out_err): disable gems
RubyGems loading is still a bottleneck at startup and this speeds up test/ruby/test_rubyoptions.rb test from 15s => 3.5s on the fastest machine I have access to. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
be076acb51
commit
2ac41230c4
1 changed files with 2 additions and 0 deletions
|
@ -583,6 +583,8 @@ EOT
|
||||||
|
|
||||||
def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil,
|
def assert_in_out_err(args, test_stdin = "", test_stdout = [], test_stderr = [], message = nil,
|
||||||
success: nil, **opt)
|
success: nil, **opt)
|
||||||
|
args = Array(args).dup
|
||||||
|
args.insert((Hash === args[0] ? 1 : 0), '--disable=gems')
|
||||||
stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, **opt)
|
stdout, stderr, status = EnvUtil.invoke_ruby(args, test_stdin, true, true, **opt)
|
||||||
if signo = status.termsig
|
if signo = status.termsig
|
||||||
EnvUtil.diagnostic_reports(Signal.signame(signo), status.pid, Time.now)
|
EnvUtil.diagnostic_reports(Signal.signame(signo), status.pid, Time.now)
|
||||||
|
|
Loading…
Reference in a new issue