gnu: lsof: Make test failures fatal.

* gnu/packages/lsof.scm (lsof)[source]: Add patch to make test suite
failures stop the build.
* gnu/packages/patches/lsof-fatal-test-failures.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
Tobias Geerinckx-Rice 2020-11-23 05:06:08 +01:00
parent 70303d073a
commit 2bf502138c
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79
3 changed files with 62 additions and 1 deletions

View file

@ -1313,6 +1313,7 @@ dist_patch_DATA = \
%D%/packages/patches/lrcalc-includes.patch \
%D%/packages/patches/lrzip-CVE-2017-8842.patch \
%D%/packages/patches/lsh-fix-x11-forwarding.patch \
%D%/packages/patches/lsof-fatal-test-failures.patch \
%D%/packages/patches/lua-CVE-2014-5461.patch \
%D%/packages/patches/lua-pkgconfig.patch \
%D%/packages/patches/lua51-liblua-so.patch \

View file

@ -24,6 +24,7 @@ (define-module (gnu packages lsof)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages)
#:use-module (gnu packages groff)
#:use-module (gnu packages perl))
@ -39,7 +40,8 @@ (define-public lsof
(commit version)))
(file-name (git-file-name name version))
(sha256
(base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp"))))
(base32 "0yxv2jg6rnzys49lyrz9yjb4knamah4xvlqj596y6ix3vm4k3chp"))
(patches (search-patches "lsof-fatal-test-failures.patch"))))
(build-system gnu-build-system)
(native-inputs
`(("groff" ,groff) ; for soelim

View file

@ -0,0 +1,58 @@
From: Tobias Geerinckx-Rice <me@tobias.gr>
Date: Mon, 23 Nov 2020 05:36:53 +0100
Subject: [PATCH] gnu: lsof: Make test failures fatal.
Submitted upstream[0].
[0]: https://github.com/lsof-org/lsof/pull/144
diff --git a/tests/Makefile b/tests/Makefile
index 08574a0..2923bb8 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -27,7 +27,7 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC
exit 1 ;\
fi
@rm -f config.LT*
- -@err=0; \
+ @err=0; \
echo ""; \
echo "Basic test:"; \
./${BASTST}; \
@@ -54,8 +54,11 @@ all: ${CKTSTDB} ${BASTST} ${STDTST} FRC
echo "Suggestion: try the optional tests: \"make opt\""; \
echo ""; \
fi; \
- fi;
- @rm -f config.LT*
+ fi; \
+ rm -f config.LT*; \
+ if [ $$err -ne 0 ]; then \
+ exit 1; \
+ fi
auto: ckDB silent FRC
@@ -112,7 +115,7 @@ LTunix: LTunix.c ${CONFIG} ${LIBOBJ} ${HDR} config.ldflags
opt: ${CKTSTDB} ${OPTTST} FRC
@rm -f config.LT*
- -@err=0; \
+ @err=0; \
echo ""; \
echo "Optional tests:"; \
for i in ${OPTTST}; do \
@@ -126,8 +129,11 @@ opt: ${CKTSTDB} ${OPTTST} FRC
else \
echo "All optional tests succeeded."; \
fi; \
- echo "";
- @rm -f config.LT*
+ echo ""; \
+ rm -f config.LT*; \
+ if [ $$err -ne 0 ]; then \
+ exit 1; \
+ fi
optional: opt