From f91686c3a79dd21356d2d418724c4a0b47ad9ab7 Mon Sep 17 00:00:00 2001 From: rabi Date: Wed, 31 Jan 2018 17:38:24 +0530 Subject: [PATCH] Fix coverage run with tox -ecover We removed .testr.conf in 93746a9b2895d44fd105ba26ae77ddffbe2db167 and tox -ecover fails with error. Change-Id: I31b00afffe38ab5c7591ba54c959349716df7c48 --- tox.ini | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 82fe0401f4..be0da0a0ab 100644 --- a/tox.ini +++ b/tox.ini @@ -49,8 +49,15 @@ commands = commands = {posargs} [testenv:cover] +setenv = + PYTHON=coverage run --source heat --parallel-mode commands = - python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}' + coverage erase + find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml coverage report [testenv:docs]