From 56e733f7845add733dc3667d5d26b99558a2fd3c Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Wed, 27 Jun 2018 14:30:36 -0400 Subject: [PATCH] Switch to using stestr According to Openstack summit session [1] stestr is maintained project to which all Openstack projects should migrate. Let's switch it then. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: Ifb64df81f7684d5bf732afcbe594a38691a7286f Signed-off-by: Chuck Short --- .gitignore | 3 ++- .stestr.conf | 3 +++ lower-constraints.txt | 3 +-- test-requirements.txt | 2 +- tox.ini | 7 +++---- 5 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .stestr.conf diff --git a/.gitignore b/.gitignore index 963e589a..e621e982 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ cover/ !.coveragerc .tox nosetests.xml +.stestr .testrepository .venv @@ -55,4 +56,4 @@ ChangeLog .*sw? # Files created by releasenotes build -releasenotes/build \ No newline at end of file +releasenotes/build diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..2a3aabd7 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./masakari/tests/unit +top_dir=./ diff --git a/lower-constraints.txt b/lower-constraints.txt index 2c6965c2..9d793751 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -50,7 +50,6 @@ networkx==1.11 openstackdocstheme==1.18.1 os-api-ref==1.4.0 os-client-config==1.29.0 -os-testr==1.0.0 oslo.cache==1.29.0 oslo.concurrency==3.26.0 oslo.config==5.2.0 @@ -106,7 +105,7 @@ sqlalchemy-migrate==0.11.0 SQLAlchemy==1.2.5 sqlparse==0.2.4 statsd==3.2.2 -stestr==2.0.0 +stestr==1.0.0 stevedore==1.20.0 taskflow==2.16.0 Tempita==0.5.2 diff --git a/test-requirements.txt b/test-requirements.txt index a9a41cbc..adfcb42c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -14,7 +14,7 @@ openstackdocstheme>=1.18.1 # Apache-2.0 os-api-ref>=1.4.0 # Apache-2.0 oslosphinx>=4.7.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 -os-testr>=1.0.0 # Apache-2.0 +stestr>=1.0.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testresources>=2.0.0 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index c45b83b4..4ca91a57 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ skipsdist = True usedevelop = True install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} - OS_TEST_PATH=./masakari/tests/unit LANGUAGE=en_US LC_ALL=en_US.utf-8 deps = -r{toxinidir}/test-requirements.txt @@ -15,7 +14,7 @@ whitelist_externals = bash find rm env -# By default ostestr will set concurrency +# By default stestr will set concurrency # to ncpu, to specify something else use # the concurrency= option. # call ie: 'tox -epy27 -- --concurrency=4' @@ -27,12 +26,12 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEB [testenv:py27] commands = {[testenv]commands} - ostestr '{posargs}' + stestr run {posargs} [testenv:py35] commands = {[testenv]commands} - ostestr '{posargs}' + stestr run {posargs} [testenv:genconfig] commands = oslo-config-generator --config-file=etc/masakari/masakari-config-generator.conf