summaryrefslogtreecommitdiff
path: root/test/lib
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2022-11-25 13:13:09 -0500
committerAlan Wu <XrXr@users.noreply.github.com>2022-11-25 17:15:24 -0500
commit1d64a5a7c09d1029508b6b3cb3d04e5a939bc8f8 (patch)
treeaa447cb2b46da4ac5b5f7ebc9b8620c4b9f0214a /test/lib
parent790cf4b6d0475614afb127b416e87cfa39044d67 (diff)
YJIT: Run test-all tests without requiring RUN_OPTS
Most tests in test_yjit.rb use a sub process, so we can run them even when the parent process is not running with YJIT. Run them so simply running `make check` tests YJIT a bit. [Misc #19149]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6814
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/jit_support.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/lib/jit_support.rb b/test/lib/jit_support.rb
index 26f8542dc2..b75b0b8847 100644
--- a/test/lib/jit_support.rb
+++ b/test/lib/jit_support.rb
@@ -69,8 +69,9 @@ module JITSupport
end
def yjit_supported?
- # e.g. x86_64-linux, x64-mswin64_140, x64-mingw32, x64-mingw-ucrt
- RUBY_PLATFORM.match?(/^(x86_64|x64|arm64|aarch64)-/)
+ return @yjit_supported if defined?(@yjit_supported)
+ # nil in mswin
+ @yjit_supported = ![nil, 'no'].include?(RbConfig::CONFIG['YJIT_SUPPORT'])
end
def remove_mjit_logs(stderr)