summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatoro Mahri <matoro_gentoo@matoro.tk>2024-02-01 23:13:50 -0500
committerMichael Orlitzky <mjo@gentoo.org>2024-03-14 20:17:57 -0400
commitb461cba9e68deb8e8853173616ed2c02fb7d5bdb (patch)
treee230efcf5a6ec34382dedab8b9d34d34c32d3115 /media-libs/libnsgif
parentnet-im/telegram-desktop-bin: add 4.15.2 (diff)
downloadgentoo-b461cba9e68deb8e8853173616ed2c02fb7d5bdb.tar.gz
gentoo-b461cba9e68deb8e8853173616ed2c02fb7d5bdb.tar.bz2
gentoo-b461cba9e68deb8e8853173616ed2c02fb7d5bdb.zip
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@matoro.tk> Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
Diffstat (limited to 'media-libs/libnsgif')
-rw-r--r--media-libs/libnsgif/files/libnsgif-1.0.0-make-test-failures-fatal.patch27
-rw-r--r--media-libs/libnsgif/libnsgif-1.0.0-r1.ebuild6
-rw-r--r--media-libs/libnsgif/libnsgif-9999.ebuild6
3 files changed, 39 insertions, 0 deletions
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 <matoro@users.noreply.github.com>
+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
}