1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-19 09:15:30 +03:00
aports/testing/ruby-liquid/tests-disable-stack-profiler.patch
Jakub Jirutka 0fd5a9a782 testing/ruby-liquid: new aport
Required for jekyll.
2021-07-01 13:38:53 +02:00

64 lines
1.9 KiB
Diff

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(-)
Patch-Source: https://src.fedoraproject.org/rpms/rubygem-liquid/raw/f34/f/00-test-unit-context-disable-stack-profiler.patch
diff --git a/test/unit/context_unit_test.rb b/test/unit/context_unit_test.rb
index fab19b8..1d59a31 100644
--- a/test/unit/context_unit_test.rb
+++ b/test/unit/context_unit_test.rb
@@ -446,11 +446,11 @@ class ContextUnitTest < Minitest::Test
assert_equal @context, @context['category'].context
end
- def test_interrupt_avoids_object_allocations
- assert_no_object_allocations do
- @context.interrupt?
- end
- end
+ # def test_interrupt_avoids_object_allocations
+ # 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 })
@@ -475,15 +475,15 @@ class ContextUnitTest < Minitest::Test
private
- 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
+# 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
end # ContextTest
--
2.24.1