From 0d357a892bc9723c9dcd1f52ffe2f6a2e127f07e Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Mon, 26 Jul 2010 10:46:03 -0700 Subject: [PATCH] Actually fail "make tests" if any of the tests fail to run. --- tests/regression/apparmor/Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/regression/apparmor/Makefile b/tests/regression/apparmor/Makefile index 1f56d8474..dba660371 100644 --- a/tests/regression/apparmor/Makefile +++ b/tests/regression/apparmor/Makefile @@ -158,27 +158,39 @@ changehat_pthread: changehat_pthread.c changehat.h tests: all @if [ `whoami` = "root" ] ;\ then \ + rc=0; \ for i in $(TESTS) ;\ do \ echo ;\ echo "running $$i" ;\ bash $$i.sh ;\ + if [ $$? -ne 0 ] ; then \ + rc=1;\ + fi;\ done ;\ + exit $$rc;\ else \ echo "must be root to run tests" ;\ + exit 1;\ fi alltests: all @if [ `whoami` = "root" ] ;\ then \ + rc=0; \ for i in $(TESTS) $(RISKY_TESTS) ;\ do \ echo ;\ echo "running $$i" ;\ bash $$i.sh ;\ + if [ $$? -ne 0 ] ; then \ + rc=1;\ + fi;\ done ;\ + exit $$rc;\ else \ echo "must be root to run tests" ;\ + exit 1;\ fi clean: