diff --git a/.gitignore b/.gitignore index aa83571f..73321c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,7 @@ doc/build heatclient/versioninfo *.egg-info *.log -.testrepository +.stestr/ # Files created by releasenotes build releasenotes/build diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..eb18d61c --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./heatclient/tests/unit} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 6e77f6be..00000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./heatclient/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 02fa291b..8a1c4eee 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -85,10 +85,9 @@ six==1.10.0 snowballstemmer==1.2.1 Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 -stestr==1.0.0 +stestr==2.0.0 stevedore==1.20.0 tempest==17.1.0 -testrepository==0.0.18 testscenarios==0.4 testtools==2.2.0 traceback2==1.4.0 diff --git a/test-requirements.txt b/test-requirements.txt index 5fb01ef9..39cdce82 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,7 +10,7 @@ requests-mock>=1.2.0 # Apache-2.0 mock>=2.0.0 # BSD mox3>=0.20.0 # Apache-2.0 python-openstackclient>=3.12.0 # Apache-2.0 +stestr>=2.0.0 # Apache-2.0 tempest>=17.1.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD testscenarios>=0.4 # Apache-2.0/BSD testtools>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 42d0e30f..4eb4ca8b 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.py[c|o]" -delete - python setup.py testr --slowest --testr-args='{posargs}' + stestr run --slowest {posargs} whitelist_externals = find [testenv:debug] @@ -45,8 +45,13 @@ passenv = OS_* [testenv:cover] basepython = python3 +setenv = + PYTHON=coverage run --source heatclient --parallel-mode commands = - python setup.py testr --coverage --testr-args='{posargs}' + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml coverage report [testenv:docs]