summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAaron Patterson <[email protected]>2021-09-07 13:59:46 -0700
committerAlan Wu <[email protected]>2021-10-20 18:19:40 -0400
commit580e1bab18dbf5fd3cb2916372b0dfcfbe3b682c (patch)
tree49dbd077956d8062dc8eec26f9dc2b84d294e683 /test
parenta1d42c37f4d849db71561e2ca60eb279719f6172 (diff)
disable yjit when testing mjit
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index e26a24e8ad..3a63f37422 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -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