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
changes/90/793590/3
Anand Bhat 2 years ago
parent 3fb26d4b99
commit 55a24e730d

2
.gitignore vendored

@ -26,7 +26,7 @@ pip-log.txt
.coverage
.tox
nosetests.xml
.testrepository
.stestr/
.venv
# Translations

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./os_performance_tools/tests/
top_dir=./

@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

@ -4,3 +4,4 @@
- publish-openstack-docs-pti
- openstack-python35-jobs
- openstack-python3-xena-jobs
- openstack-cover-jobs

@ -1,12 +1,12 @@
[metadata]
name = os-performance-tools
summary = Python scripts for use in OpenStack's QA process
description-file =
description_file =
README.rst
author = OpenStack
author-email = openstack-discuss@lists.openstack.org
home-page = https://docs.openstack.org/os-performance-tools/latest/
python-requires = >=3.5
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/os-performance-tools/latest/
python_requires = >=3.5
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology

@ -8,5 +8,5 @@ coverage>=3.6
python-subunit>=0.0.18
oslotest>=1.10.0 # Apache-2.0
testrepository>=0.0.18
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4

@ -1,6 +1,6 @@
[tox]
minversion = 3.18.0
envlist = py36,py38,pypy,pep8
envlist = py3,pypy,pep8
skipsdist = True
ignore_basepython_conflict = True
@ -10,7 +10,7 @@ usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
commands = stestr run --slowest {posargs}
[testenv:pep8]
commands = flake8
@ -19,7 +19,18 @@ commands = flake8
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
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 =

Loading…
Cancel
Save