From 8f74e2ba283c2a8ed757088d706c5e02afbe6a73 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Fri, 29 Jun 2018 22:17:47 +0000 Subject: Fix requirements and convert to stestr This commit fixes two issues that are currently blocking the gate. The first is that it bumps the Sphinx requirement to be within acceptable constraints. The second is that it converts oslo.policy to use stestr instead of testr. This is all being done in one patch because proposing them individually causes deadlock (the patch to bump the sphinx requirement fails because we're still using testr and the patch to convert to stestr fails the requirements-check job). The following explains the reasoning behind the stestr change. With the upgrade to oslotest 3.6.0 [0], testr no longer works [1]. This is because oslotest no longer requires testr and we don't depend on it directly in oslo.policy. [0] https://github.com/openstack/requirements/commit/d5a3c58f7195517a6083032e41b702c2a0aca431 [1] https://github.com/openstack/oslotest/commit/897823fbd61ae9ba015af38e9fed5a5728de64c2 Change-Id: I6dac4c8e7b39c9b80cc8f3728763e8d783c9e940 --- .gitignore | 1 + .stestr.conf | 3 +++ .testr.conf | 7 ------- lower-constraints.txt | 1 + test-requirements.txt | 3 ++- tox.ini | 2 +- 6 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index e1c21d0..5eacd30 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ ChangeLog openstack/versioninfo *.egg* .testrepository/ +.stestr/ .project .pydevproject *.mo diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..9d91c0b --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./oslo_policy/tests +top_path=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index d7af3a1..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 ./ ./oslo_policy $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/lower-constraints.txt b/lower-constraints.txt index 8347d61..daf4ff5 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -47,6 +47,7 @@ requests-mock==1.1.0 requestsexceptions==1.2.0 rfc3986==0.3.1 six==1.10.0 +stestr==2.0.0 smmap==0.9.0 snowballstemmer==1.2.1 Sphinx==1.6.5 diff --git a/test-requirements.txt b/test-requirements.txt index 704e603..d8db8f7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,13 +4,14 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 requests-mock>=1.1.0 # Apache-2.0 +stestr>=2.0.0 # Apache-2.0 # computes code coverage percentages coverage!=4.4,>=4.0 # Apache-2.0 # These are needed for docs generation openstackdocstheme>=1.18.1 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD reno>=2.5.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 58487c1..7b24a9c 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt -commands = python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:py27] basepython = python2.7 -- cgit v1.2.1