diff --git a/.gitignore b/.gitignore index 248834e..55cf1b5 100644 --- a/.gitignore +++ b/.gitignore @@ -27,7 +27,7 @@ pip-log.txt .tox nosetests.xml cover -.testrepository +.stestr/ *.sqlite .venv diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..ab0e309 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./osprofiler/tests/unit +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 7c90e7d..0000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./osprofiler/tests/unit} $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index 205cbaa..481b456 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -18,6 +18,6 @@ reno===2.5.0 requests===2.14.2 six===1.10.0 sphinx===1.6.2 -testrepository===0.0.18 +stestr==2.0.0 testtools===2.2.0 WebOb===1.7.1 diff --git a/test-requirements.txt b/test-requirements.txt index 1777ed4..ed7dc97 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0 coverage>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT mock>=2.0.0 # BSD -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT openstackdocstheme>=1.18.1 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 6adac69..a8fa5d2 100644 --- a/tox.ini +++ b/tox.ini @@ -14,12 +14,9 @@ deps = -r{toxinidir}/test-requirements.txt install_command = pip install -U {opts} {packages} usedevelop = True -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} distribute = false -[testenv:py27] -basepython = python2.7 - [testenv:functional] basepython = python2.7 setenv = {[testenv]setenv} @@ -47,7 +44,13 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = python setup.py testr --coverage --testr-args='{posargs}' +setenv = + PYTHON=coverage run --source osprofiler --parallel-mode +commands = + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] basepython = python3