diff --git a/.gitignore b/.gitignore index 65e0127..31abd6d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ build dist heat_cfntools.egg-info/ -.testrepository/ +.stestr/ subunit.log .tox AUTHORS diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..7458bd2 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./heat_cfntools/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 8528c86..0000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ./heat_cfntools/tests $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index d884e51..260b010 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -4,5 +4,5 @@ mock==1.0 pbr==0.8 psutil==1.1.1 six==1.9.0 -testrepository==0.0.18 +stestr==2.0.0 testtools==0.9.34 diff --git a/test-requirements.txt b/test-requirements.txt index 7a25edc..4550481 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ hacking>=0.9.0 mock>=1.0 -testrepository>=0.0.18 +stestr>=2.0.0 testtools>=0.9.34 diff --git a/tox.ini b/tox.ini index ffe1237..aa31c5b 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ setenv = VIRTUAL_ENV={envdir} install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 @@ -21,8 +21,14 @@ commands = bash tools/lintstack.sh [testenv:cover] basepython = python3 +setenv = + {[testenv]setenv} + PYTHON=coverage run --source heat_cfntools --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 [testenv:venv] basepython = python3