public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/liquid-c/
Date: Mon, 27 Mar 2023 10:59:35 +0000 (UTC)	[thread overview]
Message-ID: <1679914750.00deeedd67abde6417a9fc8b4baf1daba84093d3.sam@gentoo> (raw)

commit:     00deeedd67abde6417a9fc8b4baf1daba84093d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 27 09:31:54 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 27 10:59:10 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00deeedd

dev-ruby/liquid-c: enable ruby32, wire up tests

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-ruby/liquid-c/liquid-c-4.1.0.ebuild | 37 +++++++++++++++++++++++++++++----
 1 file changed, 33 insertions(+), 4 deletions(-)

diff --git a/dev-ruby/liquid-c/liquid-c-4.1.0.ebuild b/dev-ruby/liquid-c/liquid-c-4.1.0.ebuild
index 9aa91c95add5..ba74574a276c 100644
--- a/dev-ruby/liquid-c/liquid-c-4.1.0.ebuild
+++ b/dev-ruby/liquid-c/liquid-c-4.1.0.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
-USE_RUBY="ruby26 ruby27 ruby30 ruby31"
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
 
-RUBY_FAKEGEM_TASK_TEST=""
+RUBY_FAKEGEM_TASK_TEST="test:unit"
 RUBY_FAKEGEM_EXTRADOC="README.md"
 
 MY_PN=${PN/-/_}
@@ -24,5 +24,34 @@ ruby_add_rdepend ">=dev-ruby/liquid-5.0.1:*"
 
 all_ruby_prepare() {
 	sed -i -e "s/-Werror//" ext/${MY_PN}/extconf.rb || die
-	sed -i -e "/[Bb]undler/d" Rakefile || die
+
+	sed -i \
+		-e "/[Bb]undler/d" \
+		-e "/memcheck/Id" \
+		Rakefile || die
+
+	# ruby_memcheck is a gem just for running w/ valgrind.
+	# We don't run tests in ebuilds with Valgrind because it's
+	# non-portable and sometimes flaky under sandbox.
+	rm rakelib/integration_test.rake || die
+	sed -i -e '/memcheck/Id' rakelib/unit_test.rake || die
+}
+
+each_ruby_test() {
+	# Backup the original extension and hide it away
+	# The tests won't build if they detect an already-built ext
+	mkdir -p "${T}"/${RUBY}.orig || die
+	mv ext "${T}"/${RUBY}.orig/ext || die
+	cp -r "${WORKDIR}"/all/${P}/ext ext || die
+
+	nonfatal each_fakegem_test --trace || failed_tests=1
+
+	# Always restore the original extension we built, even if
+	# tests failed, as FEATURES=test-fail-continue may be enabled.
+	rm -rf ext || die
+	mv "${T}"/${RUBY}.orig/ext ext || die
+
+	if [[ ${failed_tests} == 1 ]] ; then
+		die "Tests failed with ${RUBY}!"
+	fi
 }


             reply	other threads:[~2023-03-27 10:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27 10:59 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-27 10:35 [gentoo-commits] repo/gentoo:master commit in: dev-ruby/liquid-c/ Hans de Graaff
2023-12-28  7:27 Hans de Graaff
2023-08-18 19:40 Hans de Graaff
2023-04-01  9:00 Hans de Graaff
2022-05-02  5:16 Hans de Graaff
2022-02-09  6:04 Hans de Graaff
2021-07-16  9:31 Hans de Graaff
2021-07-06  7:49 Hans de Graaff
2021-07-06  6:27 Hans de Graaff
2020-09-05  8:01 Hans de Graaff
2020-07-27  2:09 Sam James
2019-02-01 11:46 Hans de Graaff
2018-12-11  8:54 Hans de Graaff
2018-09-15  4:09 Hans de Graaff
2018-03-09  9:27 Hans de Graaff
2016-11-08 23:20 Manuel RĂ¼ger
2016-07-24 14:47 Hans de Graaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1679914750.00deeedd67abde6417a9fc8b4baf1daba84093d3.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox