commit: 28a046309bf1a0bf83f08c6feb48a4a67dd5d93e Author: Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk> AuthorDate: Wed Feb 21 01:55:00 2024 +0000 Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> CommitDate: Fri Mar 8 22:42:08 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28a04630
media-gfx/imageworsener: Respect tests exit code Also restrict tests because the tests are broken. Closes: https://bugs.gentoo.org/916906 Closes: https://github.com/gentoo/gentoo/pull/35455 Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk> Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> .../imageworsener-1.3.5-runtest-exit-code.patch | 24 ++++++++++++++++++++++ media-gfx/imageworsener/imageworsener-1.3.5.ebuild | 6 ++++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/media-gfx/imageworsener/files/imageworsener-1.3.5-runtest-exit-code.patch b/media-gfx/imageworsener/files/imageworsener-1.3.5-runtest-exit-code.patch new file mode 100644 index 000000000000..8c62638a1e28 --- /dev/null +++ b/media-gfx/imageworsener/files/imageworsener-1.3.5-runtest-exit-code.patch @@ -0,0 +1,24 @@ +https://bugs.gentoo.org/916906 +https://github.com/jsummers/imageworsener/issues/47 +https://github.com/jsummers/imageworsener/pull/46 + +From 91c7c79d86f55920193d17a7b87631b14ac7779f Mon Sep 17 00:00:00 2001 +From: matoro <mat...@users.noreply.github.com> +Date: Mon, 15 Jan 2024 22:26:45 -0500 +Subject: [PATCH] Pass diff exit code up to shell for test suite + +Right now, test failures are not getting detected because the runtests +script does not pass up a failing exit code from diff. +--- + tests/runtest | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/runtest b/tests/runtest +index 6db7b6c..3f534dc 100755 +--- a/tests/runtest ++++ b/tests/runtest +@@ -334,3 +334,4 @@ then + echo "All tests passed." + fi + ++exit $RET diff --git a/media-gfx/imageworsener/imageworsener-1.3.5.ebuild b/media-gfx/imageworsener/imageworsener-1.3.5.ebuild index 022b3e345100..ea228bb0d1fe 100644 --- a/media-gfx/imageworsener/imageworsener-1.3.5.ebuild +++ b/media-gfx/imageworsener/imageworsener-1.3.5.ebuild @@ -22,7 +22,9 @@ DEPEND="png? ( media-libs/libpng:0 ) RDEPEND="${DEPEND}" REQUIRED_USE="test? ( jpeg png webp zlib )" -RESTRICT="!test? ( test )" +RESTRICT="test" + +PATCHES=( "${FILESDIR}/${PN}-1.3.5-runtest-exit-code.patch" ) src_configure() { local switch='' @@ -44,5 +46,5 @@ src_install() { src_test() { cd "${S}"/tests || die - ./runtest "${S}"/${MY_PN} + ./runtest "${S}"/${MY_PN} || die }