summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lib/jit_support.rb9
-rw-r--r--test/ruby/test_jit.rb2
2 files changed, 7 insertions, 4 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index 82f53ec59d..c1624cc3b2 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -4,7 +4,8 @@ module JITSupport
JIT_TIMEOUT = 600 # 10min for each...
JIT_SUCCESS_PREFIX = 'JIT success \(\d+\.\dms\)'
UNSUPPORTED_COMPILERS = [
- 'icc',
+ %r[\Aicc\b],
+ %r[\A/opt/developerstudio\d+\.\d+/bin/cc\z],
]
module_function
@@ -42,7 +43,9 @@ module JITSupport
def supported?
return @supported if defined?(@supported)
- @supported = !UNSUPPORTED_COMPILERS.include?(RbConfig::CONFIG['CC'])
+ @supported = UNSUPPORTED_COMPILERS.all? do |regexp|
+ !regexp.match?(RbConfig::CONFIG['CC'])
+ end
end
def remove_mjit_logs(stderr)
@@ -54,7 +57,7 @@ module JITSupport
end
def code_block(code)
- "```\n#{code}\n```\n\n"
+ %Q["""\n#{code}\n"""\n\n]
end
# We're retrying cc1 not found error on gcc, which should be solved in the future but ignored for now.
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index 37dc18f1bf..eae75b8ddf 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -634,7 +634,7 @@ class TestJIT < Test::Unit::TestCase
end
end;
- debug_info = "stdout:\n```\n#{out}\n```\n\nstderr:\n```\n#{err}```\n"
+ debug_info = %Q[stdout:\n"""\n#{out}\n"""\n\nstderr:\n"""\n#{err}"""\n]
assert_equal('012345678910', out, debug_info)
compactions, errs = err.lines.partition do |l|
l.match?(/\AJIT compaction \(\d+\.\dms\): Compacted \d+ methods ->/)