commit:     b461cba9e68deb8e8853173616ed2c02fb7d5bdb
Author:     Matoro Mahri <matoro_gentoo <AT> matoro <DOT> tk>
AuthorDate: Fri Feb  2 04:13:50 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Mar 15 00:17:57 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b461cba9

media-libs/libnsgif: wire up tests

Test failures are currently not fatal, so this includes a downstream
patch to change that.

Closes: https://github.com/gentoo/gentoo/pull/35142
Bug: https://bugs.gentoo.org/918642
Signed-off-by: Matoro Mahri <matoro_gentoo <AT> matoro.tk>
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../libnsgif-1.0.0-make-test-failures-fatal.patch  | 27 ++++++++++++++++++++++
 media-libs/libnsgif/libnsgif-1.0.0-r1.ebuild       |  6 +++++
 media-libs/libnsgif/libnsgif-9999.ebuild           |  6 +++++
 3 files changed, 39 insertions(+)

diff --git 
a/media-libs/libnsgif/files/libnsgif-1.0.0-make-test-failures-fatal.patch 
b/media-libs/libnsgif/files/libnsgif-1.0.0-make-test-failures-fatal.patch
new file mode 100644
index 000000000000..3225587da399
--- /dev/null
+++ b/media-libs/libnsgif/files/libnsgif-1.0.0-make-test-failures-fatal.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/918642
+https://github.com/gentoo/gentoo/pull/35142
+
+commit 6537507d754ad049dbdc324ec6bdea8b30416d48
+Author: matoro <[email protected]>
+Date:   Fri Feb 16 12:44:14 2024 -0500
+
+    test: nsgif: make failing tests fatal
+    
+    Right now, failing or erroring tests is not currently considered fatal.
+    This makes any instance of either fatal.
+    
+    See: https://github.com/gentoo/gentoo/pull/35142
+
+diff --git a/test/runtest.sh b/test/runtest.sh
+index fd84847..ef7274c 100755
+--- a/test/runtest.sh
++++ b/test/runtest.sh
+@@ -68,7 +68,7 @@ done
+ echo "Tests:${GIFTESTTOTC} Pass:${GIFTESTPASSC} Fail:${GIFTESTFAILC} 
Error:${GIFTESTERRC}"
+ 
+ # exit code
+-if [ "${GIFTESTERRC}" -gt 0 ]; then
++if [ "${GIFTESTERRC}" -gt 0 ] || [ "${GIFTESTFAILC}" -gt 0 ]; then
+       exit 1
+ fi
+ 

diff --git a/media-libs/libnsgif/libnsgif-1.0.0-r1.ebuild 
b/media-libs/libnsgif/libnsgif-1.0.0-r1.ebuild
index f088e76b8618..0b43eedea1c8 100644
--- a/media-libs/libnsgif/libnsgif-1.0.0-r1.ebuild
+++ b/media-libs/libnsgif/libnsgif-1.0.0-r1.ebuild
@@ -20,6 +20,8 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=( "${FILESDIR}/${PN}-1.0.0-make-test-failures-fatal.patch" )
+
 src_prepare() {
        default
        sed -e '1i#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"' \
@@ -35,6 +37,10 @@ src_compile() {
        _emake
 }
 
+src_test() {
+       _emake test
+}
+
 src_install() {
        _emake DESTDIR="${D}" install
 }

diff --git a/media-libs/libnsgif/libnsgif-9999.ebuild 
b/media-libs/libnsgif/libnsgif-9999.ebuild
index cd94d79787e7..e6c6693cccc1 100644
--- a/media-libs/libnsgif/libnsgif-9999.ebuild
+++ b/media-libs/libnsgif/libnsgif-9999.ebuild
@@ -17,6 +17,8 @@ BDEPEND="
        virtual/pkgconfig
 "
 
+PATCHES=( "${FILESDIR}/${PN}-1.0.0-make-test-failures-fatal.patch" )
+
 src_prepare() {
        default
 }
@@ -30,6 +32,10 @@ src_compile() {
        _emake
 }
 
+src_test() {
+       _emake test
+}
+
 src_install() {
        _emake DESTDIR="${D}" install
 }

Reply via email to