aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-19 14:26:29 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-19 14:26:29 +0000
commit1a7249bc03615ffa77b23d08d8b287cce3ed10ee (patch)
tree3a0fbd6f31c008a5c3043b56f45a20659ee9a4d5 /test/ruby
parent808d833d29c3b28c9c2d1c7716cd1fe07d866e8c (diff)
downloadruby-1a7249bc03615ffa77b23d08d8b287cce3ed10ee.tar.gz
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
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_jit.rb4
-rw-r--r--test/ruby/test_rubyoptions.rb34
-rw-r--r--test/ruby/test_rubyvm_mjit.rb6
3 files changed, 29 insertions, 15 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb
index cabae57ea9..3b18373212 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_jit.rb
@@ -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
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 633d8d0ba7..1417541282 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -138,9 +138,11 @@ class TestRubyOptions < Test::Unit::TestCase
end
def test_enable
- assert_in_out_err(%w(--enable all -e) + [""], "", [], [])
- assert_in_out_err(%w(--enable-all -e) + [""], "", [], [])
- assert_in_out_err(%w(--enable=all -e) + [""], "", [], [])
+ 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,19 +200,21 @@ class TestRubyOptions < Test::Unit::TestCase
end
end
- [
- %w(--version --jit),
- %w(--version --enable=jit),
- %w(--version --enable-jit),
- ].each do |args|
- assert_in_out_err(args) do |r, e|
- assert_match(VERSION_PATTERN_WITH_JIT, r[0])
- if RubyVM::MJIT.enabled?
- assert_equal(RUBY_DESCRIPTION, r[0])
- else
- assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
+ if JITSupport.supported?
+ [
+ %w(--version --jit),
+ %w(--version --enable=jit),
+ %w(--version --enable-jit),
+ ].each do |args|
+ assert_in_out_err(args) do |r, e|
+ assert_match(VERSION_PATTERN_WITH_JIT, r[0])
+ if RubyVM::MJIT.enabled?
+ assert_equal(RUBY_DESCRIPTION, r[0])
+ else
+ assert_equal(EnvUtil.invoke_ruby(['--jit', '-e', 'print RUBY_DESCRIPTION'], '', true).first, r[0])
+ end
+ assert_equal([], e)
end
- assert_equal([], e)
end
end
end
diff --git a/test/ruby/test_rubyvm_mjit.rb b/test/ruby/test_rubyvm_mjit.rb
index f4612ed902..ce4940ba2d 100644
--- a/test/ruby/test_rubyvm_mjit.rb
+++ b/test/ruby/test_rubyvm_mjit.rb
@@ -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