Patch-Source: https://src.fedoraproject.org/rpms/rubygem-liquid/raw/f34/f/00-test-unit-context-disable-stack-profiler.patch (updated) -- From cc54e7dff9aa2a20be632f450db8ae3c31046edf Mon Sep 17 00:00:00 2001 From: Fabio Valentini <decathorpe@gmail.com> Date: Sat, 9 Mar 2019 20:38:31 +0100 Subject: [PATCH 0/2] test/unit/context: disable stack profiler Disable running stack profiler in the test suite. --- test/unit/context_unit_test.rb | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/test/unit/context_unit_test.rb b/test/unit/context_unit_test.rb --- a/test/unit/context_unit_test.rb +++ b/test/unit/context_unit_test.rb @@ -446,12 +446,12 @@ assert_equal @context, @context['category'].context end - def test_interrupt_avoids_object_allocations - @context.interrupt? # ruby 3.0.0 allocates on the first call - assert_no_object_allocations do - @context.interrupt? - end - end +# def test_interrupt_avoids_object_allocations +# @context.interrupt? # ruby 3.0.0 allocates on the first call +# assert_no_object_allocations do +# @context.interrupt? +# end +# end def test_context_initialization_with_a_proc_in_environment contx = Context.new([test: ->(c) { c['poutine'] }], { test: :foo }) @@ -476,15 +476,15 @@ private - def assert_no_object_allocations - unless RUBY_ENGINE == 'ruby' - skip "stackprof needed to count object allocations" - end - require 'stackprof' +# def assert_no_object_allocations +# unless RUBY_ENGINE == 'ruby' +# skip "stackprof needed to count object allocations" +# end +# require 'stackprof' - profile = StackProf.run(mode: :object) do - yield - end - assert_equal 0, profile[:samples] - end +# profile = StackProf.run(mode: :object) do +# yield +# end +# assert_equal 0, profile[:samples] +# end end # ContextTest