RJIT: Streamline RJIT enablement check
in bootstrap tests so that `make btest-bruby` skips the right tests.
This commit is contained in:
parent
c73959cff4
commit
78b27ce62a
@ -789,4 +789,9 @@ def check_coredump
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def rjit_enabled?
|
||||||
|
# Don't check `RubyVM::RJIT.enabled?`. On btest-bruby, target Ruby != runner Ruby.
|
||||||
|
ENV.fetch('RUN_OPTS', '').include?('rjit')
|
||||||
|
end
|
||||||
|
|
||||||
exit main
|
exit main
|
||||||
|
@ -14,7 +14,7 @@ ms = "a".."k"
|
|||||||
o.send(meth)
|
o.send(meth)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
}, '[ruby-dev:39453]' unless ENV.fetch('RUN_OPTS', '').include?('rjit') # speed up RJIT CI
|
}, '[ruby-dev:39453]' unless rjit_enabled? # speed up RJIT CI
|
||||||
|
|
||||||
assert_normal_exit %q{
|
assert_normal_exit %q{
|
||||||
a = []
|
a = []
|
||||||
|
@ -293,7 +293,6 @@ assert_normal_exit %q{
|
|||||||
exec "/"
|
exec "/"
|
||||||
}
|
}
|
||||||
|
|
||||||
rjit_enabled = RUBY_DESCRIPTION.include?('+RJIT')
|
|
||||||
assert_normal_exit %q{
|
assert_normal_exit %q{
|
||||||
(0..10).map {
|
(0..10).map {
|
||||||
Thread.new {
|
Thread.new {
|
||||||
@ -304,7 +303,7 @@ assert_normal_exit %q{
|
|||||||
}.each {|t|
|
}.each {|t|
|
||||||
t.join
|
t.join
|
||||||
}
|
}
|
||||||
} unless rjit_enabled # flaky
|
} unless rjit_enabled? # flaky
|
||||||
|
|
||||||
assert_equal 'ok', %q{
|
assert_equal 'ok', %q{
|
||||||
def m
|
def m
|
||||||
@ -498,7 +497,7 @@ assert_equal 'foo', %q{
|
|||||||
[th1, th2].each {|t| t.join }
|
[th1, th2].each {|t| t.join }
|
||||||
GC.start
|
GC.start
|
||||||
f.call.source
|
f.call.source
|
||||||
} unless rjit_enabled # flaky
|
} unless rjit_enabled? # flaky
|
||||||
assert_normal_exit %q{
|
assert_normal_exit %q{
|
||||||
class C
|
class C
|
||||||
def inspect
|
def inspect
|
||||||
|
@ -22,7 +22,7 @@ assert_equal '[:ae, :ae]', %q{
|
|||||||
end
|
end
|
||||||
|
|
||||||
[test(Array.new 5), test([])]
|
[test(Array.new 5), test([])]
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # Not yet working on RJIT
|
} unless rjit_enabled? # Not yet working on RJIT
|
||||||
|
|
||||||
# regression test for arity check with splat and send
|
# regression test for arity check with splat and send
|
||||||
assert_equal '[:ae, :ae]', %q{
|
assert_equal '[:ae, :ae]', %q{
|
||||||
@ -81,7 +81,7 @@ assert_equal 'ok', %q{
|
|||||||
GC.compact
|
GC.compact
|
||||||
end
|
end
|
||||||
:ok
|
:ok
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # Not yet working on RJIT
|
} unless rjit_enabled? # Not yet working on RJIT
|
||||||
|
|
||||||
# regression test for overly generous guard elision
|
# regression test for overly generous guard elision
|
||||||
assert_equal '[0, :sum, 0, :sum]', %q{
|
assert_equal '[0, :sum, 0, :sum]', %q{
|
||||||
@ -209,7 +209,7 @@ assert_equal '[:ok]', %q{
|
|||||||
# Used to crash due to GC run in rb_ensure_iv_list_size()
|
# Used to crash due to GC run in rb_ensure_iv_list_size()
|
||||||
# not marking the newly allocated [:ok].
|
# not marking the newly allocated [:ok].
|
||||||
RegressionTest.new.extender.itself
|
RegressionTest.new.extender.itself
|
||||||
} unless RUBY_DESCRIPTION.include?('+RJIT') # Skip on RJIT since this uncovers a crash
|
} unless rjit_enabled? # Skip on RJIT since this uncovers a crash
|
||||||
|
|
||||||
assert_equal 'true', %q{
|
assert_equal 'true', %q{
|
||||||
# regression test for tracking type of locals for too long
|
# regression test for tracking type of locals for too long
|
||||||
@ -1960,7 +1960,7 @@ assert_equal '[97, :nil, 97, :nil, :raised]', %q{
|
|||||||
getbyte("a", 0)
|
getbyte("a", 0)
|
||||||
|
|
||||||
[getbyte("a", 0), getbyte("a", 1), getbyte("a", -1), getbyte("a", -2), getbyte("a", "a")]
|
[getbyte("a", 0), getbyte("a", 1), getbyte("a", -1), getbyte("a", -2), getbyte("a", "a")]
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # Not yet working on RJIT
|
} unless rjit_enabled? # Not yet working on RJIT
|
||||||
|
|
||||||
# Test << operator on string subclass
|
# Test << operator on string subclass
|
||||||
assert_equal 'abab', %q{
|
assert_equal 'abab', %q{
|
||||||
@ -2604,7 +2604,7 @@ assert_equal '[[:c_return, :String, :string_alias, "events_to_str"]]', %q{
|
|||||||
events.compiled(events)
|
events.compiled(events)
|
||||||
|
|
||||||
events
|
events
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # RJIT calls extra Ruby methods
|
} unless rjit_enabled? # RJIT calls extra Ruby methods
|
||||||
|
|
||||||
# test enabling a TracePoint that targets a particular line in a C method call
|
# test enabling a TracePoint that targets a particular line in a C method call
|
||||||
assert_equal '[true]', %q{
|
assert_equal '[true]', %q{
|
||||||
@ -2686,7 +2686,7 @@ assert_equal '[[:c_call, :itself]]', %q{
|
|||||||
tp.enable { shouldnt_compile }
|
tp.enable { shouldnt_compile }
|
||||||
|
|
||||||
events
|
events
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # RJIT calls extra Ruby methods
|
} unless rjit_enabled? # RJIT calls extra Ruby methods
|
||||||
|
|
||||||
# test enabling c_return tracing before compiling
|
# test enabling c_return tracing before compiling
|
||||||
assert_equal '[[:c_return, :itself, main]]', %q{
|
assert_equal '[[:c_return, :itself, main]]', %q{
|
||||||
@ -2701,7 +2701,7 @@ assert_equal '[[:c_return, :itself, main]]', %q{
|
|||||||
tp.enable { shouldnt_compile }
|
tp.enable { shouldnt_compile }
|
||||||
|
|
||||||
events
|
events
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # RJIT calls extra Ruby methods
|
} unless rjit_enabled? # RJIT calls extra Ruby methods
|
||||||
|
|
||||||
# test c_call invalidation
|
# test c_call invalidation
|
||||||
assert_equal '[[:c_call, :itself]]', %q{
|
assert_equal '[[:c_call, :itself]]', %q{
|
||||||
@ -4223,7 +4223,7 @@ assert_equal 'true', %q{
|
|||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
} unless defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled? # Not yet working on RJIT
|
} unless rjit_enabled? # Not yet working on RJIT
|
||||||
|
|
||||||
# Regresssion test: register allocator on expandarray
|
# Regresssion test: register allocator on expandarray
|
||||||
assert_equal '[]', %q{
|
assert_equal '[]', %q{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user