Improving cover and docs testenv

- Add whitelist_externals envconfig setting
- Add percentage report to further analyze code-base
- Add command to rm doc/build before build sphinx

Change-Id: I996319debf8bbb8aa8792169dbc69a43e2f4cf73
This commit is contained in:
Nguyen Van Trung 2017-07-10 08:38:34 +07:00
parent 41709d75e8
commit 71226d0e9a
1 changed files with 9 additions and 2 deletions

11
tox.ini
View File

@ -6,6 +6,8 @@ skipsdist = True
[testenv] [testenv]
usedevelop = True usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
whitelist_externals = find
rm
setenv = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
BRANCH_NAME=master BRANCH_NAME=master
@ -21,7 +23,11 @@ commands = flake8
commands = {posargs} commands = {posargs}
[testenv:cover] [testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}' commands =
coverage erase
find . -type f -name "*.pyc" -delete
python setup.py test --coverage --testr-args='{posargs}'
coverage report
[testenv:py27] [testenv:py27]
commands = commands =
@ -30,7 +36,8 @@ commands =
doc8 --ignore-path "doc/source/history.rst" doc/source doc8 --ignore-path "doc/source/history.rst" doc/source
[testenv:docs] [testenv:docs]
commands = python setup.py build_sphinx commands = rm -rf doc/build
python setup.py build_sphinx
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper {posargs} commands = oslo_debug_helper {posargs}