]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test/Makefile: proper return code for "make check"
authorHarald Hoyer <harald@redhat.com>
Fri, 11 Nov 2016 11:18:06 +0000 (12:18 +0100)
committerHarald Hoyer <harald@redhat.com>
Mon, 16 Jan 2017 13:27:39 +0000 (14:27 +0100)
(cherry picked from commit aa40b82145ecc923edfade8149c2ba892bfb664d)

test/Makefile

index f71f8540548b51cf3931735f64cbea5c61a32043..eaa944fba4f882fa584180338de1ff7441b5fc64 100644 (file)
@@ -2,13 +2,14 @@
 
 check:
        @[ "$$EUID" == "0" ] || { echo "'check' must be run as root! Please use 'sudo'."; exit 1; }
-       @for i in TEST-[0-9]*; do \
+       @{ ret=0; \
+       for i in TEST-[0-9]*; do \
                [ -d $$i ] || continue ; \
                [ -f $$i/Makefile ] || continue ; \
                if [ -n "$$TESTS" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${TESTS#*$$t*}" != "$$TESTS" ] || continue; fi; \
                if [ -n "$$SKIP" ]; then t=$${i##TEST-}; t=$${t%%-*}; [ "$${SKIP#*$$t*}" != "$$SKIP" ] && continue; fi; \
-               $(MAKE) -C $$i all ; \
-       done
+               $(MAKE) -C $$i all ; ret=$$((ret + $$?)); \
+       done; exit $$ret; }
 
 clean:
        @for i in TEST-[0-9]*; do \