[blivet:rhel7/master] Add a coverage test target (#1064895)

David Lehman dlehman at redhat.com
Tue Feb 18 20:13:32 UTC 2014


On Tue, 2014-02-18 at 12:37 -0500, mulhern wrote:
> Resolves: rhbz#1064895

ACK.

> 
> Submitted by: Alexander Todorov <atodorov at redhat.com>
> Revised by: mulhern <amulhern at redhat.com>
> 
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>  Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Makefile b/Makefile
> index 872d0c1..1079faa 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -22,6 +22,12 @@ test:
>  	@echo "*** Running unittests ***"
>  	PYTHONPATH=.:tests/ python -m unittest discover -v -s tests/ -p '*_test.py'
>  
> +coverage:
> +	@which coverage || (echo "*** Please install python-coverage ***"; exit 2)
> +	@echo "*** Running unittests with coverage ***"
> +	PYTHONPATH=.:tests/ coverage run --branch -m unittest discover -v -s tests/ -p '*_test.py'
> +	coverage report --include="blivet/*"
> +
>  clean:
>  	-rm *.tar.gz blivet/*.pyc blivet/*/*.pyc ChangeLog
>  	$(MAKE) -C po clean




More information about the anaconda-patches mailing list