On Mon, Dec 22, 2014 at 08:39:54PM +0100, Christian Boltz wrote:
> Hmm, adding that message would make the code quite interesting ;-) 
> because of the way $(foreach ...) is expanded. I tried some variants, 
> but didn't find a non-ugly solution ;-)

Yeah, it's not trivial to implement this. Would be nice, though, for
when I forget.

> [ utils-test-coverage-fail-on-failed-tests.diff ]
> 
> === modified file 'utils/test/Makefile'
> --- utils/test/Makefile 2014-11-04 21:01:14 +0000
> +++ utils/test/Makefile 2014-12-22 19:23:12 +0000
> @@ -31,6 +31,13 @@
>  HTML_COVR_ARGS=-d $(COVERAGE_OUT)
>  endif
>  
> +# use   make COVERAGE_IGNORE_FAILURES=true coverage   to build coverage data 
> even if some tests fail
> +ifeq ($(COVERAGE_IGNORE_FAILURES), true)
> +  COVERAGE_IGNORE_FAILURES_CMD=true
> +else
> +  COVERAGE_IGNORE_FAILURES_CMD=set -e
> +endif
> +
>  .PHONY: clean check coverage coverage-report coverage-html
>  ifndef VERBOSE
>  .SILENT: clean check .coverage coverage coverage-report coverage-html
> @@ -43,7 +50,7 @@
>         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=.. ; $(COVERAGE_IGNORE_FAILURES_CMD) ; $(foreach 
> test, $(wildcard test-*.py), $(PYTHON) -m coverage run --branch -p $(test); )
>         $(PYTHON) -m coverage combine
>  
>  coverage: .coverage

Signed-off-by: Steve Beattie <[email protected]>, thanks.

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

-- 
AppArmor mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to