From 38660f42cd594c51778baa8603ac432304d502c6 Mon Sep 17 00:00:00 2001 From: nagachika Date: Fri, 20 Mar 2020 06:47:10 +0000 Subject: merge revision(s) b3ea0980db87404c2b7763a3fdbe898c3812843d,5fbb4555b427909aed4fe2376c4c583849c1d51c,6477d98e49dbe04deb03caee1a58a34c3b79d4e4,16415fefc14e1419d5587288fb6a69fe5ccf94ba: Check MJIT support in one place to fix test failure on trunk-no-mjit https://gist.github.com/ko1/32ab982ffd7555988818773c08f97123 Prefer using MJIT_CC for JIT support check because Solaris might have CC=cc and we'd like to check full path MJIT_CC=/opt/developerstudio12.5/bin/cc instead. test/lib/jit_support.rb: Update the regexp for icc MJIT_CC is always an absolute path. test/lib/jit_support.rb: The path to icc was changed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/lib/jit_support.rb | 6 +++--- test/ruby/test_jit.rb | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb index c1624cc3b2..5e47ff45e3 100644 --- a/test/lib/jit_support.rb +++ b/test/lib/jit_support.rb @@ -4,7 +4,7 @@ module JITSupport JIT_TIMEOUT = 600 # 10min for each... JIT_SUCCESS_PREFIX = 'JIT success \(\d+\.\dms\)' UNSUPPORTED_COMPILERS = [ - %r[\Aicc\b], + %r[\A.*/bin/intel64/icc\b], %r[\A/opt/developerstudio\d+\.\d+/bin/cc\z], ] @@ -44,8 +44,8 @@ module JITSupport def supported? return @supported if defined?(@supported) @supported = UNSUPPORTED_COMPILERS.all? do |regexp| - !regexp.match?(RbConfig::CONFIG['CC']) - end + !regexp.match?(RbConfig::CONFIG['MJIT_CC']) + 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 eae75b8ddf..fb63d4087c 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 -- cgit v1.2.3