[apparmor] [patch] make coverage should fail if one of the tests fails

Christian Boltz apparmor at cboltz.de
Sat Nov 29 20:26:03 UTC 2014


Hello,

the subject says it all - make coverage should fail if one of the tests 
fails. Currently it ignores failures and creates the coverage data, so
the failed test has a good chance to go unnoticed.

The patch adds a "set -e" to let "make coverage" fail if one of the 
tests fails.

=== modified file 'utils/test/Makefile'
--- utils/test/Makefile 2014-11-04 21:01:14 +0000
+++ utils/test/Makefile 2014-11-29 20:07:05 +0000
@@ -43,8 +43,10 @@
        export PYTHONPATH=.. ; $(foreach test, $(wildcard test-*.py), $(call pyalldo, $(test)))
 
 .coverage: $(wildcard ../aa-* ../apparmor/*.py test-*.py)
-       export PYTHONPATH=.. ; $(foreach test, $(wildcard test-*.py), $(PYTHON) -m coverage run --branch -p $(test); )
+       export PYTHONPATH=.. ; set -e ; $(foreach test, $(wildcard test-*.py), $(PYTHON) -m coverage run --branch -p $(test); )
        $(PYTHON) -m coverage combine
 
 coverage: .coverage


Regards,

Christian Boltz
-- 
a computer without an Internet connection is essentially a very
expensive DVD player
[http://www.randsinrepose.com/archives/2006/07/10/a_nerd_in_a_cave.html]




More information about the AppArmor mailing list