Skip to content

Commit

Permalink
Check that YJIT is available before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb committed Nov 22, 2023
1 parent cbdc874 commit 7a1cdb5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions burn_in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ def test_loop(bench_names, logs_path, run_time, ruby_version)
ruby_version = IO.popen("ruby -v --yjit", &:read).strip
puts ruby_version

# Check that YJIT is available
if !ruby_version.include?("+YJIT")
puts("Ruby version string doesn't include +YJIT. You may want to run `chruby ruby-yjit`.")
exit(-1)
end

# Check if debug info is included in Ruby binary (this only works on Linux, not macOS)
output = IO.popen("file `which ruby`", &:read).strip
if !output.include?("debug_info")
Expand Down

0 comments on commit 7a1cdb5

Please sign in to comment.