summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro@users.noreply.github.com>2022-09-28 21:44:12 -0400
committerMatt Turner <mattst88@gentoo.org>2022-10-22 17:33:11 -0400
commit36c1c995a835c018c2df4426e98f9ec8597f4b5c (patch)
treeadda2553557b1fa47a51533d792059dde9a65d0c /dev-ruby/rack-test
parentdev-ruby/sus: add 0.13.0, drop 0.6.2 (diff)
downloadgentoo-36c1c995a835c018c2df4426e98f9ec8597f4b5c.tar.gz
gentoo-36c1c995a835c018c2df4426e98f9ec8597f4b5c.tar.bz2
gentoo-36c1c995a835c018c2df4426e98f9ec8597f4b5c.zip
dev-ruby/rack-test: fix tests on sparc
See: https://github.com/rack/rack-test/issues/323 Signed-off-by: Matoro Mahri <matoro@users.noreply.github.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-ruby/rack-test')
-rw-r--r--dev-ruby/rack-test/files/backport-b1084c1-issue-323.patch29
-rw-r--r--dev-ruby/rack-test/rack-test-2.0.2.ebuild2
2 files changed, 31 insertions, 0 deletions
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 <code@jeremyevans.net>
+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 )"