From 8373138dd71ab8f1b29e64692b753d99d83e3377 Mon Sep 17 00:00:00 2001 From: openstack Date: Thu, 10 Jan 2019 04:09:06 +0000 Subject: [PATCH] Update coverage environment and use template for cover After switch to using stestr, testrepository is unnecessary and it is removed in patch[1]. After patch[1] got merged tox -e cover returns "error: option --coverage not recognized". In this patch fixed coverage environment to default stestr setup. Also used openstack-tox-cover template, this runs the cover job in the check queue only. [1]: https://review.openstack.org/#/c/581686/ Closes-Bug: #1809230 Change-Id: I77a295a64e2c4d128a6772e400c0968f40d11c1d --- .zuul.yaml | 1 + tox.ini | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 9ce7ef75..fd15308f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,7 @@ - project: templates: - check-requirements + - openstack-cover-jobs - openstack-python-jobs - openstack-python35-jobs-nonvoting - release-notes-jobs-python3 diff --git a/tox.ini b/tox.ini index 0ed1879f..9cb012be 100644 --- a/tox.ini +++ b/tox.ini @@ -52,8 +52,14 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = python setup.py test --coverage --testr-args='{posargs}' - coverage report +setenv = + VIRTUAL_ENV={envdir} + PYTHON=coverage run --source masakari --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] basepython = python3