summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2020-06-06 12:14:24 -0500
committerMonty Taylor <mordred@inaugust.com>2020-06-06 12:14:24 -0500
commit1582c55a243efa984ea7534dba711109b1e65f86 (patch)
tree230ccd0403bb7abcc61d9fc778a5e2baab2d8118
parentf7f25b54ba5b66f83b8e4837d24b7ef88f11110d (diff)
downloadcliff-1582c55a243efa984ea7534dba711109b1e65f86.tar.gz
Migrate to stestr
testr isn't what we use anymore. Change-Id: I4cb8b9ca41da6efd7053a5a7bacfce1654a73576
-rw-r--r--.testr.conf7
-rw-r--r--lower-constraints.txt2
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini14
4 files changed, 14 insertions, 11 deletions
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index faf55cf..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 ./ ./cliff $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 0e84936..4f33016 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -28,8 +28,8 @@ smmap==0.9.0
snowballstemmer==1.2.1
Sphinx==2.0.0
sphinxcontrib-websupport==1.0.1
+stestr==1.0.0
stevedore==1.20.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 f33895f..d013b21 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -3,7 +3,7 @@
# process, which may cause wedges in the gate later.
python-subunit>=1.0.0 # Apache-2.0/BSD
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=1.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
mock>=2.0.0 # BSD
testscenarios>=0.4 # Apache-2.0/BSD
diff --git a/tox.ini b/tox.ini
index bc9f04a..b979324 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,8 +12,8 @@ setenv =
OS_TEST_TIMEOUT=60
distribute = False
commands =
- python setup.py test --coverage --coverage-package-name=cliff --slowest --testr-args='{posargs}'
- coverage report --show-missing
+ stestr run {posargs}
+ stestr slowest
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
@@ -53,3 +53,13 @@ deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
+
+[testenv:cover]
+setenv =
+ {[testenv]setenv}
+ PYTHON=coverage run --source cliff --parallel-mode
+commands =
+ stestr run {posargs}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml