public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Eli Schwartz <eschwartz93@gmail.com>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [RFC PATCH 08/10] net-print/cups: avoid running unittests in src_compile
Date: Tue,  5 Dec 2023 00:20:33 -0500	[thread overview]
Message-ID: <20231205052550.3150055-9-eschwartz93@gmail.com> (raw)
In-Reply-To: <20231205052550.3150055-1-eschwartz93@gmail.com>

If USE=test, an option was passed to configure that makes unittest
binaries be built, and as a side effect also runs them. But we really do
not want to run tests in src_compile, as FEATURES=test might not be set.

Crudely hack around this by overriding the autoconf variable that would
normally be set by `$(use_enable test unit-tests)`, when running the
test invocation itself. As a side effect, this also moves the
test-program compilation to src_test.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
---
 net-print/cups/cups-2.4.7-r2.ebuild | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/net-print/cups/cups-2.4.7-r2.ebuild b/net-print/cups/cups-2.4.7-r2.ebuild
index 3f63cd43a70c..d8a193a64337 100644
--- a/net-print/cups/cups-2.4.7-r2.ebuild
+++ b/net-print/cups/cups-2.4.7-r2.ebuild
@@ -30,8 +30,6 @@ LICENSE="Apache-2.0"
 SLOT="0"
 IUSE="acl dbus debug kerberos openssl pam selinux static-libs systemd test usb X xinetd zeroconf"
 
-# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
-# by default to input for us), but they fail on some greyscale issue w/ poppler?
 RESTRICT="!test? ( test )"
 
 BDEPEND="
@@ -167,7 +165,6 @@ multilib_src_configure() {
 		$(use_enable kerberos gssapi)
 		$(multilib_native_use_enable pam)
 		$(use_enable static-libs static)
-		$(use_enable test unit-tests)
 		--with-tls=$(usex openssl openssl gnutls)
 		$(use_with systemd ondemand systemd)
 		$(multilib_native_use_enable usb libusb)
@@ -222,7 +219,12 @@ multilib_src_test() {
 	mkdir "${T}"/cups-tests || die
 
 	# We only build some of CUPS for multilib, so can't run the tests.
-	multilib_is_native_abi && default
+	if multilib_is_native_abi; then
+		# avoid building *and running* test binaries in src_compile
+		# https://github.com/OpenPrinting/cups/commit/b1d42061e9286f50eefc851ed906d17c6e80c4b0
+		emake UNITTESTS=unittests
+		default
+	fi
 }
 
 multilib_src_install() {
-- 
2.41.0



  parent reply	other threads:[~2023-12-05  5:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05  5:20 [gentoo-dev] [RFC PATCH 00/10] Upgrading cups-filters to 2.0.0 Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 01/10] net-print/libcupsfilters: new package, add 2.0.0 Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 02/10] net-print/libppd: " Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 03/10] net-print/cups-filters: " Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 04/10] net-print/cups-browsed: new package, " Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 05/10] net-print/cups-meta: new package, add 1 Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 06/10] net-print/cups: drop cyclic dependency on cups-filters Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 07/10] net-print/cups: re-enable tests Eli Schwartz
2023-12-05  5:20 ` Eli Schwartz [this message]
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 09/10] net-print/cups-browsed: restrict tests Eli Schwartz
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 10/10] net-print/cups-filters: " Eli Schwartz
2023-12-05 21:51 ` [gentoo-dev] [RFC PATCH 00/10] Upgrading cups-filters to 2.0.0 James Le Cuirot

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=20231205052550.3150055-9-eschwartz93@gmail.com \
    --to=eschwartz93@gmail.com \
    --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