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 09/10] net-print/cups-browsed: restrict tests
Date: Tue,  5 Dec 2023 00:20:34 -0500	[thread overview]
Message-ID: <20231205052550.3150055-10-eschwartz93@gmail.com> (raw)
In-Reply-To: <20231205052550.3150055-1-eschwartz93@gmail.com>

The tests are newly created during the 2.x upgrade. They will hang
forever if they cannot run properly. And running them properly has hit a
wall. I'm not sure where to go on from here.

Even getting this far means stepping outside of what portage can
reasonably require. Avahi only runs as root, and doesn't seem to have a
mocking mode, and even if it is running, the sandbox prevents src_test
from seeing it.

Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
---
 .../cups-browsed/cups-browsed-2.0.0.ebuild    | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/net-print/cups-browsed/cups-browsed-2.0.0.ebuild b/net-print/cups-browsed/cups-browsed-2.0.0.ebuild
index 6baeb697f2cd..0232d57c8b51 100644
--- a/net-print/cups-browsed/cups-browsed-2.0.0.ebuild
+++ b/net-print/cups-browsed/cups-browsed-2.0.0.ebuild
@@ -29,6 +29,18 @@ BDEPEND="
 	virtual/pkgconfig
 "
 
+# The tests are new since the split out of cups-filters. Actually running them
+# seems to be challenging. You need:
+# - cups tools that are USE-optional
+# - running avahi-daemon (as root!)
+# - disable portage's pid-sandbox, which interferes with avahi
+# - ipptool still fails to connect to port 8xxx
+#
+# If anything fails, a `while true` loop fails to successfully launch and break
+# out of the loop, leading to a hang. Until there's an obvious recipe for
+# successfully running the tests, restrict it.
+RESTRICT="test"
+
 PATCHES=(
 	"${FILESDIR}"/0001-cups-browsed.c-Fix-build-with-avahi-disabled-20.patch
 )
@@ -47,6 +59,13 @@ src_configure() {
 	econf "${myeconfargs[@]}"
 }
 
+src_test() {
+	# Requires avahi running. Hangs forever if not available.
+	avahi-daemon --check 2>/dev/null || die "no running avahi daemon found, cannot run tests"
+
+	default
+}
+
 src_install() {
 	default
 
-- 
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 ` [gentoo-dev] [RFC PATCH 08/10] net-print/cups: avoid running unittests in src_compile Eli Schwartz
2023-12-05  5:20 ` Eli Schwartz [this message]
2023-12-05  5:20 ` [gentoo-dev] [RFC PATCH 10/10] net-print/cups-filters: restrict tests 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-10-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