From 1582c55a243efa984ea7534dba711109b1e65f86 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Sat, 6 Jun 2020 12:14:24 -0500 Subject: [PATCH] Migrate to stestr testr isn't what we use anymore. Change-Id: I4cb8b9ca41da6efd7053a5a7bacfce1654a73576 --- .testr.conf | 7 ------- lower-constraints.txt | 2 +- test-requirements.txt | 2 +- tox.ini | 14 ++++++++++++-- 4 files changed, 14 insertions(+), 11 deletions(-) delete mode 100644 .testr.conf diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index faf55cfd..00000000 --- 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 0e849362..4f330164 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 f33895fb..d013b213 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 bc9f04a5..b9793241 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