summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-12-01 10:53:58 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2019-12-01 10:53:59 -0800
commitb3ea0980db87404c2b7763a3fdbe898c3812843d (patch)
treec3b9c2c250e0d65062b37273e312e1d3fdd5fb0a /test
parent6bc8b4d8ea6cb8865225c0afcf1abd9e4b725376 (diff)
Check MJIT support in one place
to fix test failure on trunk-no-mjit https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123
Diffstat (limited to 'test')
-rw-r--r--test/lib/jit_support.rb2
-rw-r--r--test/ruby/test_jit.rb2
2 files changed, 1 insertions, 3 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index bab1d4e5c4..4f0d16d487 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -47,7 +47,7 @@ module JITSupport
return @supported if defined?(@supported)
@supported = UNSUPPORTED_COMPILERS.all? do |regexp|
!regexp.match?(RbConfig::CONFIG['CC'])
- end
+ end && RbConfig::CONFIG["MJIT_SUPPORT"] != 'no'
end
def remove_mjit_logs(stderr)
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 533ebbd25e..a8ce18b48c 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -3,8 +3,6 @@ require 'test/unit'
require 'tmpdir'
require_relative '../lib/jit_support'
-return if RbConfig::CONFIG["MJIT_SUPPORT"] == 'no'
-
# Test for --jit option
class TestJIT < Test::Unit::TestCase
include JITSupport