summaryrefslogtreecommitdiff
path: root/test/lib/jit_support.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-11-03 22:18:15 -0700
committerTakashi Kokubun <[email protected]>2023-11-03 22:18:16 -0700
commit9f95b6eb5d3458cc79668afd24b0b10c161d7d84 (patch)
tree45aae0fd258b5a05137acafda8a17bd395de46e5 /test/lib/jit_support.rb
parent6b2a3c84a5a6f06841a277439052ca17a4c65e08 (diff)
Skip a test that is flaky with RJIT
It's crashing inside the bug reporter after a crash, so not sure why it's crashing. It's not really useful for maintaining RJIT to flag this test failure, so let's just ignore it until we figure out why it fails. https://github.com/ruby/ruby/actions/runs/6752729246/job/18358439166
Diffstat (limited to 'test/lib/jit_support.rb')
-rw-r--r--test/lib/jit_support.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index 3f21367987..cf3baaaeb7 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -9,6 +9,10 @@ module JITSupport
@yjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['YJIT_SUPPORT'])
end
+ def yjit_enabled?
+ defined?(RubyVM::YJIT.enabled?) && RubyVM::YJIT.enabled?
+ end
+
def yjit_force_enabled?
"#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?YJIT_FORCE_ENABLE\b/)
end
@@ -19,6 +23,10 @@ module JITSupport
@rjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['RJIT_SUPPORT'])
end
+ def rjit_enabled?
+ defined?(RubyVM::RJIT) && RubyVM::RJIT.enabled?
+ end
+
def rjit_force_enabled?
"#{RbConfig::CONFIG['CFLAGS']} #{RbConfig::CONFIG['CPPFLAGS']}".match?(/(\A|\s)-D ?RJIT_FORCE_ENABLE\b/)
end