diff --git a/.gitignore b/.gitignore index 1a626d49fc..be42a23724 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ *.pyc /doc/source/teams/*.rst /.coverage* -/.testrepository/ +.stestr/ /cover/ /unreleased-*.txt gerrit.ini diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000000..693bcaabd3 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./openstack_releases/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index b22fa4bb71..0000000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 OS_DEBUG=1 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index af2bc030c9..add978e1b1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,7 +6,7 @@ hacking>=1.0.0,<1.1.0 fixtures>=3.0.0 # Apache-2.0/BSD python-subunit>=0.0.18 # Apache-2.0/BSD -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD testtools>=1.4.0 # MIT oslotest>=1.10.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index ef7639d534..8044c9222b 100644 --- a/tox.ini +++ b/tox.ini @@ -14,11 +14,15 @@ setenv = PYTHONUNBUFFERED=1 LOGDIR={envdir}/log TMPDIR={envdir}/tmp + PYTHON=coverage run --source openstack_releases --parallel-mode basepython = python3 deps = -r{toxinidir}/test-requirements.txt commands = - python setup.py testr --coverage --testr-args='{posargs}' - coverage report --show-missing + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report --show-missing [testenv:validate] deps = @@ -56,9 +60,6 @@ commands = {posargs} [testenv:history] commands = {toxinidir}/tools/build_tag_history.sh {toxinidir} -[testenv:cover] -#commands = python setup.py testr --coverage --testr-args='{posargs}' - [testenv:docs] deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}