Skip to content

Commit

Permalink
Skip GC compaction tests in test_yjit.rb when not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 authored and XrXr committed Oct 16, 2024
1 parent c6c1e11 commit ebfe615
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/ruby/test_yjit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,8 @@ def test_code_gc_with_many_iseqs
end

def test_code_gc_with_auto_compact
omit "compaction is not supported on this platform" unless GC.respond_to?(:compact)

assert_compiles((code_gc_helpers + <<~'RUBY'), exits: :any, result: :ok, mem_size: 1, code_gc: true)
# Test ISEQ moves in the middle of code GC
GC.auto_compact = true
Expand Down Expand Up @@ -1278,6 +1280,8 @@ def foo(_, a, b, c)
end

def test_gc_compact_cyclic_branch
omit "compaction is not supported on this platform" unless GC.respond_to?(:compact)

assert_compiles(<<~'RUBY', result: 2)
def foo
i = 0
Expand Down

0 comments on commit ebfe615

Please sign in to comment.