os-performance-tools/tox.ini
Anand Bhat 55a24e730d Replace dashes with underscore & Migrate to stestr
* Setuptools v54.1.0 introduces a warning that the use of dash-separated
  options in 'setup.cfg' will not be supported in a future version [1].
  Get ahead of the issue by replacing the dashes with underscores.Without
  this, we see 'UserWarning' messages.
* Replace .testr.conf by .stestr.conf for migration and update
  .gitignore and test-requirements.txt file accordingly
* Use py3 as the default runtime for tox
* Add a new job, openstack-cover-jobs, to run the coverage in Zuul

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I3169456592324425b9a9ddc4dbcf8abcf3b82135
2021-06-02 16:20:58 +05:30

60 lines
1.2 KiB
INI

[tox]
minversion = 3.18.0
envlist = py3,pypy,pep8
skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands = flake8
[testenv:venv]
commands = {posargs}
[testenv:cover]
allowlist_externals = find
setenv =
{[testenv]setenv}
PYTHON=coverage run --source os_performance_tools --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs]
deps =
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:pdf-docs]
deps = {[testenv:docs]deps}
allowlist_externals =
make
commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:debug]
commands = oslo_debug_helper {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build