2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-29 13:28:19 +00:00

Actually fail "make tests" if any of the tests fail to run.

This commit is contained in:
Kees Cook 2010-07-26 10:46:03 -07:00
parent e180ed4ccb
commit 0d357a892b

View File

@ -158,27 +158,39 @@ changehat_pthread: changehat_pthread.c changehat.h
tests: all tests: all
@if [ `whoami` = "root" ] ;\ @if [ `whoami` = "root" ] ;\
then \ then \
rc=0; \
for i in $(TESTS) ;\ for i in $(TESTS) ;\
do \ do \
echo ;\ echo ;\
echo "running $$i" ;\ echo "running $$i" ;\
bash $$i.sh ;\ bash $$i.sh ;\
if [ $$? -ne 0 ] ; then \
rc=1;\
fi;\
done ;\ done ;\
exit $$rc;\
else \ else \
echo "must be root to run tests" ;\ echo "must be root to run tests" ;\
exit 1;\
fi fi
alltests: all alltests: all
@if [ `whoami` = "root" ] ;\ @if [ `whoami` = "root" ] ;\
then \ then \
rc=0; \
for i in $(TESTS) $(RISKY_TESTS) ;\ for i in $(TESTS) $(RISKY_TESTS) ;\
do \ do \
echo ;\ echo ;\
echo "running $$i" ;\ echo "running $$i" ;\
bash $$i.sh ;\ bash $$i.sh ;\
if [ $$? -ne 0 ] ; then \
rc=1;\
fi;\
done ;\ done ;\
exit $$rc;\
else \ else \
echo "must be root to run tests" ;\ echo "must be root to run tests" ;\
exit 1;\
fi fi
clean: clean: