summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/lsof-fatal-test-failures.patch
blob: e874ba6ad440a7edbb999252a86cbde84fe33471 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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