aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml2
-rw-r--r--test/ruby/test_jit.rb6
2 files changed, 7 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index f42408a775..f70de377cb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -61,7 +61,7 @@ before_script:
script:
- "make -s test TESTOPTS=--color=never"
- - "make -s $JOBS test-all -o exts TESTOPTS='-q --color=never --job-status=normal'"
+ - "make -s $JOBS test-all -o exts TESTOPTS='-q --color=never --job-status=normal' RUBY_FORCE_TEST_JIT=1"
- "make -s $JOBS test-spec MSPECOPT=-j"
# Branch matrix. Not all branches are Travis-ready so we limit branches here.
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index f519f72059..5414904e5a 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -61,6 +61,12 @@ class TestJIT < Test::Unit::TestCase
def jit_supported?
return @jit_supported if defined?(@jit_supported)
+ # Experimental. If you want to ensure JIT is working with this test, please set this for now.
+ if ENV.key?('RUBY_FORCE_TEST_JIT')
+ return @jit_supported = true
+ end
+
+ # Very pessimistic check. With this check, we can't ensure JIT is working.
begin
_, err = eval_with_jit('proc {}.call', verbose: 1, min_calls: 1, timeout: 10)
@jit_supported = err.match?(JIT_SUCCESS_PREFIX)