mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
disable yjit when testing mjit
This commit is contained in:
parent
a1d42c37f4
commit
580e1bab18
1 changed files with 8 additions and 8 deletions
|
@ -164,9 +164,9 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||||
|
|
||||||
def test_enable
|
def test_enable
|
||||||
if JITSupport.supported?
|
if JITSupport.supported?
|
||||||
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 -e) + [""], "", [], [])
|
assert_in_out_err(%w(--enable-all --disable-yjit -e) + [""], "", [], [])
|
||||||
assert_in_out_err(%w(--enable=all -e) + [""], "", [], [])
|
assert_in_out_err(%w(--enable=all --disable-yjit -e) + [""], "", [], [])
|
||||||
end
|
end
|
||||||
assert_in_out_err(%w(--enable foobarbazqux -e) + [""], "", [],
|
assert_in_out_err(%w(--enable foobarbazqux -e) + [""], "", [],
|
||||||
/unknown argument for --enable: `foobarbazqux'/)
|
/unknown argument for --enable: `foobarbazqux'/)
|
||||||
|
@ -229,16 +229,16 @@ class TestRubyOptions < Test::Unit::TestCase
|
||||||
|
|
||||||
if JITSupport.supported?
|
if JITSupport.supported?
|
||||||
[
|
[
|
||||||
%w(--version --jit),
|
%w(--version --disable-yjit --jit),
|
||||||
%w(--version --enable=jit),
|
%w(--version --disable-yjit --enable=jit),
|
||||||
%w(--version --enable-jit),
|
%w(--version --disable-yjit --enable-jit),
|
||||||
].each do |args|
|
].each do |args|
|
||||||
assert_in_out_err(args) do |r, e|
|
assert_in_out_err(args) do |r, e|
|
||||||
assert_match(VERSION_PATTERN_WITH_JIT, r[0])
|
assert_match(VERSION_PATTERN_WITH_JIT, r[0])
|
||||||
if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE
|
if defined?(RubyVM::JIT) && RubyVM::JIT.enabled? # checking -DMJIT_FORCE_ENABLE
|
||||||
assert_equal(RUBY_DESCRIPTION, r[0])
|
assert_equal(RUBY_DESCRIPTION, r[0])
|
||||||
else
|
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
|
end
|
||||||
assert_equal([], e)
|
assert_equal([], e)
|
||||||
end
|
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".
|
# 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/)
|
if JITSupport.supported? && !RUBY_PLATFORM.match?(/mswin/)
|
||||||
env = { 'MJIT_SEARCH_BUILD_DIR' => 'true' }
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue