1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test/lib/jit_support.rb: continue to skip test_jit

for icc since it's not supported yet but running on rubyci.

This reverts some part of r65175, r65176 and r65177.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-10-19 14:26:29 +00:00
parent 808d833d29
commit 1a7249bc03
4 changed files with 36 additions and 18 deletions

View file

@ -1,9 +1,8 @@
module JITSupport
JIT_TIMEOUT = 600 # 10min for each...
JIT_SUCCESS_PREFIX = 'JIT success \(\d+\.\dms\)'
SUPPORTED_COMPILERS = [
'gcc',
'clang',
UNSUPPORTED_COMPILERS = [
'icc',
]
module_function
@ -35,6 +34,11 @@ module JITSupport
)
end
def supported?
return @supported if defined?(@supported)
@supported = !UNSUPPORTED_COMPILERS.include?(RbConfig::CONFIG['CC'])
end
def remove_mjit_logs(stderr)
if RubyVM::MJIT.enabled?
stderr.gsub(/^MJIT warning: Skipped to compile unsupported instruction: \w+\n/m, '')

View file

@ -32,6 +32,10 @@ class TestJIT < Test::Unit::TestCase
end
def setup
unless JITSupport.supported?
skip 'JIT seems not supported on this platform'
end
# ruby -w -Itest/lib test/ruby/test_jit.rb
if $VERBOSE && !defined?(@@at_exit_hooked)
at_exit do

View file

@ -138,9 +138,11 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_enable
if JITSupport.supported?
assert_in_out_err(%w(--enable all -e) + [""], "", [], [])
assert_in_out_err(%w(--enable-all -e) + [""], "", [], [])
assert_in_out_err(%w(--enable=all -e) + [""], "", [], [])
end
assert_in_out_err(%w(--enable foobarbazqux -e) + [""], "", [],
/unknown argument for --enable: `foobarbazqux'/)
assert_in_out_err(%w(--enable), "", [], /missing argument for --enable/)
@ -198,6 +200,7 @@ class TestRubyOptions < Test::Unit::TestCase
end
end
if JITSupport.supported?
[
%w(--version --jit),
%w(--version --enable=jit),
@ -214,6 +217,7 @@ class TestRubyOptions < Test::Unit::TestCase
end
end
end
end
def test_eval
assert_in_out_err(%w(-e), "", [], /no code specified for -e \(RuntimeError\)/)

View file

@ -5,6 +5,12 @@ require_relative '../lib/jit_support'
class TestRubyVMMJIT < Test::Unit::TestCase
include JITSupport
def setup
unless JITSupport.supported?
skip 'JIT seems not supported on this platform'
end
end
def test_pause
out, err = eval_with_jit(<<~'EOS', verbose: 1, min_calls: 1, wait: false)
i = 0