summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_mjit.rb (renamed from test/ruby/test_jit.rb)18
-rw-r--r--test/ruby/test_mjit_debug.rb (renamed from test/ruby/test_jit_debug.rb)8
-rw-r--r--test/ruby/test_rubyoptions.rb2
-rw-r--r--test/ruby/test_rubyvm_mjit.rb (renamed from test/ruby/test_rubyvm_jit.rb)0
-rw-r--r--test/ruby/test_yjit.rb2
5 files changed, 15 insertions, 15 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_mjit.rb
index 3e3da24641..30c5659c14 100644
--- a/test/ruby/test_jit.rb
+++ b/test/ruby/test_mjit.rb
@@ -3,8 +3,8 @@ require 'test/unit'
require 'tmpdir'
require_relative '../lib/jit_support'
-# Test for --jit option
-class TestJIT < Test::Unit::TestCase
+# Test for --mjit option
+class TestMJIT < Test::Unit::TestCase
include JITSupport
IGNORABLE_PATTERNS = [
@@ -31,7 +31,7 @@ class TestJIT < Test::Unit::TestCase
:opt_invokebuiltin_delegate,
].each do |insn|
if !RubyVM::INSTRUCTION_NAMES.include?(insn.to_s)
- warn "instruction #{insn.inspect} is not defined but included in TestJIT::TEST_PENDING_INSNS"
+ warn "instruction #{insn.inspect} is not defined but included in TestMJIT::TEST_PENDING_INSNS"
end
end
@@ -46,17 +46,17 @@ class TestJIT < Test::Unit::TestCase
# ci.rvm.jp caches its build environment. Clean up temporary files left by SEGV.
if ENV['RUBY_DEBUG']&.include?('ci')
Dir.glob("#{ENV.fetch('TMPDIR', '/tmp')}/_ruby_mjit_p*u*.*").each do |file|
- puts "test/ruby/test_jit.rb: removing #{file}"
+ puts "test/ruby/test_mjit.rb: removing #{file}"
File.unlink(file)
end
end
- # ruby -w -Itest/lib test/ruby/test_jit.rb
+ # ruby -w -Itest/lib test/ruby/test_mjit.rb
if $VERBOSE
pid = $$
at_exit do
- if pid == $$ && !TestJIT.untested_insns.empty?
- warn "you may want to add tests for following insns, when you have a chance: #{TestJIT.untested_insns.join(' ')}"
+ if pid == $$ && !TestMJIT.untested_insns.empty?
+ warn "you may want to add tests for following insns, when you have a chance: #{TestMJIT.untested_insns.join(' ')}"
end
end
end
@@ -620,7 +620,7 @@ class TestJIT < Test::Unit::TestCase
end;
end
- def test_jit_output
+ def test_mjit_output
out, err = eval_with_jit('5.times { puts "MJIT" }', verbose: 1, min_calls: 5)
assert_equal("MJIT\n" * 5, out)
assert_match(/^#{JIT_SUCCESS_PREFIX}: block in <main>@-e:1 -> .+_ruby_mjit_p\d+u\d+\.c$/, err)
@@ -1237,7 +1237,7 @@ class TestJIT < Test::Unit::TestCase
$stderr.puts
warn "'#{insn}' insn is not included in the script. Actual insns are: #{used_insns.join(' ')}\n", uplevel: uplevel
end
- TestJIT.untested_insns.delete(insn)
+ TestMJIT.untested_insns.delete(insn)
end
# Collect block's insns or defined method's insns, which are expected to be JIT-ed.
diff --git a/test/ruby/test_jit_debug.rb b/test/ruby/test_mjit_debug.rb
index b8dc9416ef..0b50acc68d 100644
--- a/test/ruby/test_jit_debug.rb
+++ b/test/ruby/test_mjit_debug.rb
@@ -1,13 +1,13 @@
-require_relative 'test_jit'
+require_relative 'test_mjit'
-return unless defined?(TestJIT)
+return unless defined?(TestMJIT)
return if ENV.key?('APPVEYOR')
return if ENV.key?('RUBYCI_NICKNAME')
return if ENV['RUBY_DEBUG']&.include?('ci') # ci.rvm.jp
return if /mswin/ =~ RUBY_PLATFORM
-class TestJITDebug < TestJIT
- @@test_suites.delete TestJIT if self.respond_to? :on_parallel_worker?
+class TestMJITDebug < TestMJIT
+ @@test_suites.delete TestMJIT if self.respond_to? :on_parallel_worker?
def setup
super
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index b7dfbd25c4..ab15006e4c 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -1122,7 +1122,7 @@ class TestRubyOptions < Test::Unit::TestCase
assert_in_out_err([IO::NULL], success: true)
end
- def test_jit_debug
+ def test_mjit_debug
# mswin uses prebuilt precompiled header. Thus it does not show a pch compilation log to check "-O0 -O1".
if JITSupport.supported? && !RUBY_PLATFORM.match?(/mswin/)
env = { 'MJIT_SEARCH_BUILD_DIR' => 'true' }
diff --git a/test/ruby/test_rubyvm_jit.rb b/test/ruby/test_rubyvm_mjit.rb
index 5449c6226d..5449c6226d 100644
--- a/test/ruby/test_rubyvm_jit.rb
+++ b/test/ruby/test_rubyvm_mjit.rb
diff --git a/test/ruby/test_yjit.rb b/test/ruby/test_yjit.rb
index bf6345faa6..1d93ac9b59 100644
--- a/test/ruby/test_yjit.rb
+++ b/test/ruby/test_yjit.rb
@@ -11,7 +11,7 @@ require_relative '../lib/jit_support'
return unless defined?(RubyVM::YJIT) && RubyVM::YJIT.enabled?
# Tests for YJIT with assertions on compilation and side exits
-# insipired by the MJIT tests in test/ruby/test_jit.rb
+# insipired by the MJIT tests in test/ruby/test_mjit.rb
class TestYJIT < Test::Unit::TestCase
def test_yjit_in_ruby_description
assert_includes(RUBY_DESCRIPTION, '+YJIT')