diff options
author | Alan Wu <[email protected]> | 2022-11-25 13:13:09 -0500 |
---|---|---|
committer | Alan Wu <[email protected]> | 2022-11-25 17:15:24 -0500 |
commit | 1d64a5a7c09d1029508b6b3cb3d04e5a939bc8f8 (patch) | |
tree | aa447cb2b46da4ac5b5f7ebc9b8620c4b9f0214a /test/lib | |
parent | 790cf4b6d0475614afb127b416e87cfa39044d67 (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.rb | 5 |
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) |