commit: 36c1c995a835c018c2df4426e98f9ec8597f4b5c Author: Matoro Mahri <matoro <AT> users <DOT> noreply <DOT> github <DOT> com> AuthorDate: Thu Sep 29 01:44:12 2022 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Sat Oct 22 21:33:11 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=36c1c995
dev-ruby/rack-test: fix tests on sparc See: https://github.com/rack/rack-test/issues/323 Signed-off-by: Matoro Mahri <matoro <AT> users.noreply.github.com> Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> .../files/backport-b1084c1-issue-323.patch | 29 ++++++++++++++++++++++ dev-ruby/rack-test/rack-test-2.0.2.ebuild | 2 ++ 2 files changed, 31 insertions(+) diff --git a/dev-ruby/rack-test/files/backport-b1084c1-issue-323.patch b/dev-ruby/rack-test/files/backport-b1084c1-issue-323.patch new file mode 100644 index 000000000000..84b3b2307aeb --- /dev/null +++ b/dev-ruby/rack-test/files/backport-b1084c1-issue-323.patch @@ -0,0 +1,29 @@ +https://github.com/rack/rack-test/issues/323 + +From b1084c1f7b04f6bdaad73c9d1ffc1b279af55e78 Mon Sep 17 00:00:00 2001 +From: Jeremy Evans <[email protected]> +Date: Wed, 28 Sep 2022 18:33:43 -0700 +Subject: [PATCH] Make the UploadedFile GC finalizer test more reliable on + CRuby + +--- + spec/rack/test/uploaded_file_spec.rb | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/spec/rack/test/uploaded_file_spec.rb b/spec/rack/test/uploaded_file_spec.rb +index 2cb56ac..67bfbc5 100644 +--- a/spec/rack/test/uploaded_file_spec.rb ++++ b/spec/rack/test/uploaded_file_spec.rb +@@ -69,8 +69,10 @@ def file_path + System.gc + end + else +- c.new(file_path) +- GC.start ++ 50.times do |_i| ++ c.new(file_path) ++ GC.start ++ end + end + + # Due to CRuby's conservative garbage collection, you can never guarantee diff --git a/dev-ruby/rack-test/rack-test-2.0.2.ebuild b/dev-ruby/rack-test/rack-test-2.0.2.ebuild index 15c959648795..1791e958884f 100644 --- a/dev-ruby/rack-test/rack-test-2.0.2.ebuild +++ b/dev-ruby/rack-test/rack-test-2.0.2.ebuild @@ -19,6 +19,8 @@ SLOT="$(ver_cut 1)" KEYWORDS="amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86" IUSE="" +PATCHES=( "${FILESDIR}/backport-b1084c1-issue-323.patch" ) # https://github.com/rack/rack-test/issues/323 + ruby_add_rdepend ">=dev-ruby/rack-1.3:*" ruby_add_bdepend " test? ( dev-ruby/minitest:5 dev-ruby/minitest-global_expectations )"
