diff --git a/.gitignore b/.gitignore index 6d933b08e..05d13c2f1 100644 --- a/.gitignore +++ b/.gitignore @@ -25,8 +25,6 @@ pip-log.txt # Unit test / coverage reports .coverage .tox -nosetests.xml -.testrepository .stestr .venv diff --git a/lower-constraints.txt b/lower-constraints.txt index 6131e6356..b1141ae1c 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -143,7 +143,6 @@ stestr==2.0.0 stevedore==1.28.0 Tempita==0.5.2 tenacity==4.9.0 -testrepository==0.0.20 testresources==2.0.0 testscenarios==0.4 testtools==2.2.0 diff --git a/test-requirements.txt b/test-requirements.txt index a9768e582..12fde8fad 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -17,6 +17,7 @@ testresources>=2.0.0 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT redis>=2.10.0 # MIT +stestr>=2.0.0 # Apache-2.0 hiredis>=0.2.0 # BSD reno>=2.5.0 # Apache-2.0 PrettyTable<0.8,>=0.7.2 # BSD diff --git a/tox.ini b/tox.ini index b0e93ca66..ef84c60cd 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/re -r{toxinidir}/test-requirements.txt whitelist_externals = sh /bin/rm commands = /bin/rm -f .testrepository/times.dbm - ostestr '{posargs}' + stestr run {posargs} [testenv:fullstack] basepython = python2.7 @@ -36,9 +36,14 @@ commands = {toxinidir}/tools/generate_config_file_samples.sh commands = {posargs} [testenv:cover] +setenv = + PYTHON=coverage run --source $project --parallel-mode commands = - python setup.py testr --coverage --testr-args='{posargs}' - coverage report + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:releasenotes] commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html