Migrate to stestr
This patch updates tox.ini to use stestr instead of testr.
Change-Id: I6be57c0c90d7711c172243b9de43034735334de7
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 6d83b3c..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
- OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
- OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
- ${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 8ad5962..47c128f 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -7,6 +7,6 @@
coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
diff --git a/tox.ini b/tox.ini
index f168afd..70b834d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,7 +10,9 @@
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
deps = -r{toxinidir}/test-requirements.txt
-commands = python setup.py test --slowest --testr-args='{posargs}'
+commands =
+ stestr run {posargs}
+ stestr slowest
[testenv:pep8]
commands = flake8 {posargs}
@@ -19,7 +21,18 @@
commands = {posargs}
[testenv:cover]
-commands = python setup.py test --coverage --testr-args='{posargs}'
+setenv =
+ {[testenv]setenv}
+ PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode
+whitelist_externals =
+ find
+commands =
+ find octavia_tempest_plugin -type f -name "*.pyc" -delete
+ coverage erase
+ stestr run {posargs}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
[testenv:docs]
deps =