guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

10/11: gnu: lsof: Make test failures fatal.


From: guix-commits
Subject: 10/11: gnu: lsof: Make test failures fatal.
Date: Sun, 22 Nov 2020 23:47:42 -0500 (EST)

nckx pushed a commit to branch master
in repository guix.

commit 2bf502138c9c8cad945866061772fe0e1f4b7175
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Mon Nov 23 05:06:08 2020 +0100

    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.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/lsof.scm                              |  4 +-
 .../patches/lsof-fatal-test-failures.patch         | 58 ++++++++++++++++++++++
 3 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index f0a5560..f105f55 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -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                    \
diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm
index 0421ca7..77d93e9 100644
--- a/gnu/packages/lsof.scm
+++ b/gnu/packages/lsof.scm
@@ -24,6 +24,7 @@
   #: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 @@
             (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
diff --git a/gnu/packages/patches/lsof-fatal-test-failures.patch 
b/gnu/packages/patches/lsof-fatal-test-failures.patch
new file mode 100644
index 0000000..e874ba6
--- /dev/null
+++ b/gnu/packages/patches/lsof-fatal-test-failures.patch
@@ -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
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]