diff options
Diffstat (limited to 'test/lib/jit_support.rb')
-rw-r--r-- | test/lib/jit_support.rb | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb index 82f53ec59d..8d17ed9552 100644 --- a/test/lib/jit_support.rb +++ b/test/lib/jit_support.rb @@ -4,7 +4,14 @@ module JITSupport JIT_TIMEOUT = 600 # 10min for each... JIT_SUCCESS_PREFIX = 'JIT success \(\d+\.\dms\)' UNSUPPORTED_COMPILERS = [ - 'icc', + %r[\A.*/bin/intel64/icc\b], + %r[\A/opt/developerstudio\d+\.\d+/bin/cc\z], + ] + # freebsd12: cc1 internal failure https://rubyci.org/logs/rubyci.s3.amazonaws.com/freebsd12/ruby-master/log/20200306T103003Z.fail.html.gz + # rhel8: one or more PCH files were found, but they were invalid https://rubyci.org/logs/rubyci.s3.amazonaws.com/rhel8/ruby-master/log/20200306T153003Z.fail.html.gz + PENDING_RUBYCI_NICKNAMES = %w[ + freebsd12 + rhel8 ] module_function @@ -42,7 +49,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['MJIT_CC']) + end && RbConfig::CONFIG["MJIT_SUPPORT"] != 'no' && !PENDING_RUBYCI_NICKNAMES.include?(ENV['RUBYCI_NICKNAME']) end def remove_mjit_logs(stderr) @@ -54,7 +63,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. |