Split tox environments requirements files
- add py36 environment - separate unit tests requirements from neturon test cases - rename zuul project file - remote tempest from unit tests requirements Change-Id: I7b054f679c44cde70d00d1f030853b0c6f528d4d
This commit is contained in:
parent
835b1aa854
commit
895602c93e
4
neutron-requirements.txt
Normal file
4
neutron-requirements.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# Neutron test cases requirements
|
||||||
|
|
||||||
|
tempest>=17.1.0 # Apache-2.0
|
||||||
|
stestr>=2.0 # Apache-2.0
|
@ -1,6 +1,4 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# pep8 and flake8 requirements
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
flake8==2.5.5 # MIT
|
flake8==2.5.5 # MIT
|
||||||
flake8-import-order==0.12 # LGPLv3
|
flake8-import-order==0.12 # LGPLv3
|
||||||
|
19
playbooks/post-tobiko-devstack.yaml
Normal file
19
playbooks/post-tobiko-devstack.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Copyright 2018 Red Hat
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
#TODO(fressi): fill this playbook
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
19
playbooks/tobiko-devstack.yaml
Normal file
19
playbooks/tobiko-devstack.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Copyright 2018 Red Hat
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
#TODO(fressi): fill this playbook
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
@ -1,5 +1,3 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
# pylint requirements
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
pylint>=1.9
|
pylint>=1.9 # GPLv2
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
|
# Tobiko framework requirements
|
||||||
|
|
||||||
keystoneauth1>=2.0.0
|
keystoneauth1>=2.0.0
|
||||||
oslo.config>=5.2.0
|
oslo.config>=5.2.0
|
||||||
oslo.log>=3.36.0
|
oslo.log>=3.36.0
|
||||||
python-heatclient>=1.5.0
|
python-heatclient>=1.5.0
|
||||||
python-neutronclient>=6.7.0
|
python-neutronclient>=6.7.0
|
||||||
|
testtools>=2.2.0
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
mock >= 2.0 # BSD
|
# unit tests requirements
|
||||||
testscenarios>=0.4
|
|
||||||
testtools>=2.2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
tempest>=17.1.0 # Apache-2.0
|
mock>=2.0 # BSD
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
stestr>=2.0 # Apache-2.0
|
||||||
|
@ -14,18 +14,10 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from tempest import config
|
|
||||||
import testscenarios
|
|
||||||
import testtools
|
|
||||||
|
|
||||||
from tobiko.common import constants
|
import testtools
|
||||||
from tobiko.common import clients
|
|
||||||
|
|
||||||
|
|
||||||
class TobikoTest(testtools.testcase.WithAttributes,
|
class TobikoTest(testtools.testcase.WithAttributes,
|
||||||
testscenarios.WithScenarios,
|
|
||||||
testtools.TestCase):
|
testtools.TestCase):
|
||||||
|
pass
|
||||||
default_params = constants.DEFAULT_PARAMS
|
|
||||||
conf = config.CONF
|
|
||||||
clientManager = clients.ClientManager()
|
|
||||||
|
@ -20,12 +20,15 @@ import sys
|
|||||||
from tobiko.tests import base
|
from tobiko.tests import base
|
||||||
from tobiko.common.managers import stack
|
from tobiko.common.managers import stack
|
||||||
from tobiko.common.managers import network
|
from tobiko.common.managers import network
|
||||||
|
from tobiko.common import clients
|
||||||
from tobiko.common import constants
|
from tobiko.common import constants
|
||||||
|
|
||||||
|
|
||||||
class ScenarioTestsBase(base.TobikoTest):
|
class ScenarioTestsBase(base.TobikoTest):
|
||||||
"""All scenario tests inherit from this scenario base class."""
|
"""All scenario tests inherit from this scenario base class."""
|
||||||
|
|
||||||
|
clientManager = clients.ClientManager()
|
||||||
|
default_params = constants.DEFAULT_PARAMS
|
||||||
stack = None
|
stack = None
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
74
tox.ini
74
tox.ini
@ -1,13 +1,13 @@
|
|||||||
[tox]
|
[tox]
|
||||||
|
envlist = pep8,pylint,py35,py36,py27
|
||||||
|
|
||||||
minversion = 2.0
|
minversion = 2.0
|
||||||
envlist = pep8,pylint,py35,py27
|
|
||||||
|
|
||||||
|
|
||||||
[testenv]
|
[tobiko]
|
||||||
usedevelop = True
|
deps =
|
||||||
|
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||||
install_command =
|
-r{toxinidir}/requirements.txt
|
||||||
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
||||||
|
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
@ -15,23 +15,34 @@ setenv =
|
|||||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||||
PYTHON=coverage run --source tobiko --parallel-mode
|
|
||||||
|
|
||||||
whitelist_externals=
|
|
||||||
find
|
[testenv]
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
find . -type f -name ".coverage*" -delete
|
||||||
find . -type f -name "*.pyc" -delete
|
find . -type f -name "*.pyc" -delete
|
||||||
|
coverage erase
|
||||||
stestr --test-path ./tobiko/tests/cmd run {posargs}
|
stestr --test-path ./tobiko/tests/cmd run {posargs}
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage html -d cover
|
coverage html -d cover
|
||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
coverage report
|
coverage report
|
||||||
|
find . -type f -name ".coverage*" -delete
|
||||||
|
|
||||||
deps =
|
deps =
|
||||||
|
{[tobiko]deps}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
|
setenv =
|
||||||
|
{[tobiko]setenv}
|
||||||
|
PYTHON=coverage run --source tobiko --parallel-mode
|
||||||
|
|
||||||
|
usedevelop = True
|
||||||
|
|
||||||
|
whitelist_externals=
|
||||||
|
find
|
||||||
|
|
||||||
|
|
||||||
[testenv:neutron]
|
[testenv:neutron]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -39,37 +50,60 @@ basepython = python3
|
|||||||
commands =
|
commands =
|
||||||
stestr --test-path ./tobiko/tests/scenario run {posargs}
|
stestr --test-path ./tobiko/tests/scenario run {posargs}
|
||||||
|
|
||||||
|
deps =
|
||||||
|
{[tobiko]deps}
|
||||||
|
-r{toxinidir}/neutron-requirements.txt
|
||||||
|
|
||||||
|
setenv =
|
||||||
|
{[tobiko]setenv}
|
||||||
|
PYTHON=python
|
||||||
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
|
||||||
deps =
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
{posargs}
|
{posargs}
|
||||||
|
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
{[testenv:neutron]deps}
|
||||||
|
|
||||||
|
setenv =
|
||||||
|
{[tobiko]setenv}
|
||||||
|
PYTHON=python
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
|
||||||
deps =
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
-r{toxinidir}/pep8-requirements.txt
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
flake8
|
flake8
|
||||||
|
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
{[testenv:neutron]deps}
|
||||||
|
-r{toxinidir}/pep8-requirements.txt
|
||||||
|
|
||||||
|
setenv =
|
||||||
|
{[tobiko]setenv}
|
||||||
|
PYTHON=python
|
||||||
|
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
|
||||||
deps =
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
-r{toxinidir}/pylint-requirements.txt
|
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
pylint -E --rcfile=.pylintrc -e W,E tobiko
|
pylint -E --rcfile=.pylintrc -e W,E tobiko
|
||||||
|
|
||||||
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
{[testenv:neutron]deps}
|
||||||
|
-r{toxinidir}/pylint-requirements.txt
|
||||||
|
|
||||||
|
setenv =
|
||||||
|
{[tobiko]setenv}
|
||||||
|
PYTHON=python
|
||||||
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
# E125 continuation line does not distinguish itself from next logical line
|
# E125 continuation line does not distinguish itself from next logical line
|
||||||
|
@ -8,10 +8,12 @@
|
|||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
- openstack-tox-pylint
|
- openstack-tox-pylint
|
||||||
- openstack-tox-py35
|
- openstack-tox-py35
|
||||||
|
- openstack-tox-py36
|
||||||
- openstack-tox-py27
|
- openstack-tox-py27
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-pep8
|
- openstack-tox-pep8
|
||||||
- openstack-tox-pylint
|
- openstack-tox-pylint
|
||||||
- openstack-tox-py35
|
- openstack-tox-py35
|
||||||
|
- openstack-tox-py36
|
||||||
- openstack-tox-py27
|
- openstack-tox-py27
|
Loading…
Reference in New Issue
Block a user