summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-11-12 16:38:24 -0500
committerSam James <sam@gentoo.org>2023-12-18 03:53:24 +0000
commitfd6b80fed96eadee8e30f9d644f7a206143b1f7f (patch)
tree827755ddb8c4affd0fdfb544bda0b5e5737faeec
parentnet-print/cups: avoid running unittests in src_compile (diff)
downloadgentoo-fd6b80fed96eadee8e30f9d644f7a206143b1f7f.tar.gz
gentoo-fd6b80fed96eadee8e30f9d644f7a206143b1f7f.tar.bz2
gentoo-fd6b80fed96eadee8e30f9d644f7a206143b1f7f.zip
net-print/cups-browsed: restrict tests
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> Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-print/cups-browsed/cups-browsed-2.0.0.ebuild19
1 files changed, 19 insertions, 0 deletions
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