General overhaul of testing setup
- Moved to py3 by default - Moved to testr - Updated docs venv to match PTI - Fixed a slight py3 compat issue - Added py35 and py36 jobs Change-Id: Id3a8c1c30ecfe9b6538bff6357aecca7ecd0ed81 Signed-off-by: Graham Hayes <gr@ham.ie>
This commit is contained in:
parent
982382a549
commit
d6805491ed
1
.gitignore
vendored
1
.gitignore
vendored
@ -29,6 +29,7 @@ cover/
|
|||||||
nosetests.xml
|
nosetests.xml
|
||||||
.testrepository
|
.testrepository
|
||||||
.venv
|
.venv
|
||||||
|
.stestr/
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
*.mo
|
*.mo
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=${OS_TEST_PATH:-./os_api_ref/tests}
|
||||||
|
top_dir=./
|
@ -10,6 +10,10 @@
|
|||||||
- openstack/os-api-ref
|
- openstack/os-api-ref
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
|
templates:
|
||||||
|
- openstack-python-jobs
|
||||||
|
- openstack-python35-jobs
|
||||||
|
- openstack-python36-jobs
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- os-api-ref-nova-src
|
- os-api-ref-nova-src
|
||||||
|
5
doc/requirements.txt
Normal file
5
doc/requirements.txt
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# The order of packages is significant, because pip processes them in the order
|
||||||
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
|
# process, which may cause wedges in the gate later.
|
||||||
|
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||||
|
openstackdocstheme>=1.18.1 # Apache-2.0
|
@ -19,6 +19,7 @@ from docutils.parsers import rst
|
|||||||
from docutils.parsers.rst.directives.tables import Table
|
from docutils.parsers.rst.directives.tables import Table
|
||||||
from docutils.statemachine import ViewList
|
from docutils.statemachine import ViewList
|
||||||
import pbr.version
|
import pbr.version
|
||||||
|
import six
|
||||||
from sphinx.util.osutil import copyfile
|
from sphinx.util.osutil import copyfile
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
@ -406,7 +407,7 @@ class RestParametersDirective(Table):
|
|||||||
groups = []
|
groups = []
|
||||||
trow = nodes.row()
|
trow = nodes.row()
|
||||||
entry = nodes.entry()
|
entry = nodes.entry()
|
||||||
para = nodes.paragraph(text=unicode(table_data))
|
para = nodes.paragraph(text=six.u(table_data))
|
||||||
entry += para
|
entry += para
|
||||||
trow += entry
|
trow += entry
|
||||||
rows.append(trow)
|
rows.append(trow)
|
||||||
|
@ -10,3 +10,4 @@ testrepository>=0.0.18 # Apache-2.0/BSD
|
|||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
sphinx-testing>=0.7.2 # BSD License
|
sphinx-testing>=0.7.2 # BSD License
|
||||||
beautifulsoup4>=4.6.0 # MIT
|
beautifulsoup4>=4.6.0 # MIT
|
||||||
|
stestr>=2.0.0 # Apache-2.0
|
||||||
|
15
tox.ini
15
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
envlist = py27,pep8,docs
|
envlist = py27,py35,pep8,docs
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@ -11,26 +11,33 @@ deps =
|
|||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands = python setup.py test --slowest --no-parallel --testr-args='{posargs}'
|
commands = stestr run {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
|
basepython = python3
|
||||||
commands = flake8 {posargs}
|
commands = flake8 {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
|
basepython = python3
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
basepython = python3
|
||||||
|
deps =
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
|
-r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/doc/requirements.txt
|
||||||
|
commands = sphinx-build -W -b html doc/source doc/build
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
|
basepython = python3
|
||||||
commands = oslo_debug_helper {posargs}
|
commands = oslo_debug_helper {posargs}
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E123, E125 skipped as they are invalid PEP-8.
|
# E123, E125 skipped as they are invalid PEP-8.
|
||||||
|
|
||||||
show-source = True
|
show-source = True
|
||||||
ignore = E123,E125,E129
|
ignore = E123,E125,E129
|
||||||
builtins = _
|
builtins = _
|
||||||
|
Loading…
Reference in New Issue
Block a user