From: Harald Hoyer Date: Fri, 11 Nov 2016 11:18:06 +0000 (+0100) Subject: test/Makefile: proper return code for "make check" X-Git-Tag: 045~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a5586cae4cb71ec12015363c350278a3e4af7a;p=thirdparty%2Fdracut.git test/Makefile: proper return code for "make check" (cherry picked from commit aa40b82145ecc923edfade8149c2ba892bfb664d) --- diff --git a/test/Makefile b/test/Makefile index f71f85405..eaa944fba 100644 --- a/test/Makefile +++ b/test/Makefile @@ -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 \