From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C523A15802F for ; Mon, 27 Mar 2023 10:59:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AAFDDE0891; Mon, 27 Mar 2023 10:59:37 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F627E0891 for ; Mon, 27 Mar 2023 10:59:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 98924335D9A for ; Mon, 27 Mar 2023 10:59:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2DDAA8E3 for ; Mon, 27 Mar 2023 10:59:35 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1679914750.00deeedd67abde6417a9fc8b4baf1daba84093d3.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-ruby/liquid-c/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-ruby/liquid-c/liquid-c-4.1.0.ebuild X-VCS-Directories: dev-ruby/liquid-c/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 00deeedd67abde6417a9fc8b4baf1daba84093d3 X-VCS-Branch: master Date: Mon, 27 Mar 2023 10:59:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 63facaa3-b7f3-4572-bb63-2c262175cc15 X-Archives-Hash: 37f55f6624757ab585f6da7bcd7cc368 commit: 00deeedd67abde6417a9fc8b4baf1daba84093d3 Author: Sam James gentoo org> AuthorDate: Mon Mar 27 09:31:54 2023 +0000 Commit: Sam James gentoo 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 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 }