зеркало из https://github.com/github/ruby.git
disable yjit when testing mjit
This commit is contained in:
Родитель
a1d42c37f4
Коммит
580e1bab18
|
@ -164,9 +164,9 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
|
||||
def test_enable
|
||||
if JITSupport.supported?
|
||||
assert_in_out_err(%w(--enable all -e) + [""], "", [], [])
|
||||
assert_in_out_err(%w(--enable-all -e) + [""], "", [], [])
|
||||
assert_in_out_err(%w(--enable=all -e) + [""], "", [], [])
|
||||
assert_in_out_err(%w(--enable all --disable-yjit -e) + [""], "", [], [])
|
||||
assert_in_out_err(%w(--enable-all --disable-yjit -e) + [""], "", [], [])
|
||||
assert_in_out_err(%w(--enable=all --disable-yjit -e) + [""], "", [], [])
|
||||
end
|
||||
assert_in_out_err(%w(--enable foobarbazqux -e) + [""], "", [],
|
||||
/unknown argument for --enable: `foobarbazqux'/)
|
||||
|
@ -229,16 +229,16 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
|
||||
if JITSupport.supported?
|
||||
[
|
||||
%w(--version --jit),
|
||||
%w(--version --enable=jit),
|
||||
%w(--version --enable-jit),
|
||||
%w(--version --disable-yjit --jit),
|
||||
%w(--version --disable-yjit --enable=jit),
|
||||
%w(--version --disable-yjit --enable-jit),
|
||||
].each do |args|
|
||||
assert_in_out_err(args) do |r, e|
|
||||
assert_match(VERSION_PATTERN_WITH_JIT, r[0])
|
||||
if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE
|
||||
assert_equal(RUBY_DESCRIPTION, r[0])
|
||||
else
|
||||
assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
|
||||
assert_equal(EnvUtil.invoke_ruby(['--disable-yjit', '--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
|
||||
end
|
||||
assert_equal([], e)
|
||||
end
|
||||
|
@ -1103,7 +1103,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
# mswin uses prebuilt precompiled header. Thus it does not show a pch compilation log to check "-O0 -O1".
|
||||
if JITSupport.supported? && !RUBY_PLATFORM.match?(/mswin/)
|
||||
env = { 'MJIT_SEARCH_BUILD_DIR' => 'true' }
|
||||
assert_in_out_err([env, "--jit-debug=-O0 -O1", "--jit-verbose=2", "" ], "", [], /-O0 -O1/)
|
||||
assert_in_out_err([env, "--disable-yjit", "--jit-debug=-O0 -O1", "--jit-verbose=2", "" ], "", [], /-O0 -O1/)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче