From de7e0f0df2acf2e2827d98387417dc0c2ea263aa Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Tue, 3 Jul 2018 13:32:27 +0700 Subject: [PATCH] Switch to stestr According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: Ibee9bd5c371f6f94131cccf093ec2100e258f411 --- .gitignore | 2 +- .stestr.conf | 3 +++ .testr.conf | 4 ---- lower-constraints.txt | 2 +- test-requirements.txt | 2 +- tox.ini | 12 ++++++++---- 6 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index 22bfe61..7c17993 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ build/ doc/build/ doc/source/api/ dist/ -.testrepository/ +.stestr/ .project .pydevproject diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..e3008bc --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./oslo_rootwrap/tests +top_path=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 1641f86..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 ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index 9a1bfdb..32d7eaf 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -40,8 +40,8 @@ smmap==0.9.0 snowballstemmer==1.2.1 Sphinx==1.6.2 sphinxcontrib-websupport==1.0.1 +stestr==2.0.0 stevedore==1.20.0 -testrepository==0.0.18 testtools==2.2.0 traceback2==1.4.0 unittest2==1.1.0 diff --git a/test-requirements.txt b/test-requirements.txt index 08248d0..ed60fb1 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,8 +5,8 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD -testrepository>=0.0.18 # Apache-2.0/BSD testtools>=2.2.0 # MIT +stestr>=2.0.0 # Apache-2.0 # this is required for the docs build jobs sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD diff --git a/tox.ini b/tox.ini index 97fbdd0..24d69ab 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,8 @@ deps = # run in a separate process whitelist_externals = env commands = - python setup.py testr --slowest --testr-args='(?!tests.test_functional_eventlet)tests {posargs}' - env TEST_EVENTLET=1 python setup.py testr --slowest --testr-args='tests.test_functional_eventlet' + stestr run --slowest (?!tests.test_functional_eventlet)tests {posargs} + env TEST_EVENTLET=1 stestr run --slowest tests.test_functional_eventlet [testenv:py27] basepython = python2.7 @@ -31,9 +31,13 @@ commands = basepython = python3 deps = {[testenv]deps} coverage +setenv = + PYTHON=coverage run --source $project --parallel-mode commands = - python setup.py testr --coverage - + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:venv] basepython = python3