Blame 0173-test-Makefile-proper-return-code-for-make-check.patch
|
Harald Hoyer |
53404a |
From 45ab6b164724e3c7540bbc723f437806d3791098 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
53404a |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
53404a |
Date: Fri, 11 Nov 2016 12:18:06 +0100
|
|
Harald Hoyer |
53404a |
Subject: [PATCH] test/Makefile: proper return code for "make check"
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
(cherry picked from commit aa40b82145ecc923edfade8149c2ba892bfb664d)
|
|
Harald Hoyer |
53404a |
---
|
|
Harald Hoyer |
53404a |
test/Makefile | 7 ++++---
|
|
Harald Hoyer |
53404a |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
diff --git a/test/Makefile b/test/Makefile
|
|
Harald Hoyer |
53404a |
index f71f854..eaa944f 100644
|
|
Harald Hoyer |
53404a |
--- a/test/Makefile
|
|
Harald Hoyer |
53404a |
+++ b/test/Makefile
|
|
Harald Hoyer |
53404a |
@@ -2,13 +2,14 @@
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
check:
|
|
Harald Hoyer |
53404a |
@[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
|
|
Harald Hoyer |
53404a |
- @for i in TEST-[0-9]*; do \
|
|
Harald Hoyer |
53404a |
+ @{ ret=0; \
|
|
Harald Hoyer |
53404a |
+ for i in TEST-[0-9]*; do \
|
|
Harald Hoyer |
53404a |
[ -d $$i ] || continue ; \
|
|
Harald Hoyer |
53404a |
[ -f $$i/Makefile ] || continue ; \
|
|
Harald Hoyer |
53404a |
if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \
|
|
Harald Hoyer |
53404a |
if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \
|
|
Harald Hoyer |
53404a |
- $(MAKE) -C $$i all ; \
|
|
Harald Hoyer |
53404a |
- done
|
|
Harald Hoyer |
53404a |
+ $(MAKE) -C $$i all ; ret=$$((ret + $$?)); \
|
|
Harald Hoyer |
53404a |
+ done; exit $$ret; }
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
clean:
|
|
Harald Hoyer |
53404a |
@for i in TEST-[0-9]*; do \
|