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
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
# pep8 and flake8 requirements
|
||||
|
||||
flake8==2.5.5 # MIT
|
||||
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
|
||||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
# pylint requirements
|
||||
|
||||
pylint>=1.9
|
||||
pylint>=1.9 # GPLv2
|
||||
|
@ -1,5 +1,8 @@
|
||||
# Tobiko framework requirements
|
||||
|
||||
keystoneauth1>=2.0.0
|
||||
oslo.config>=5.2.0
|
||||
oslo.log>=3.36.0
|
||||
python-heatclient>=1.5.0
|
||||
python-neutronclient>=6.7.0
|
||||
testtools>=2.2.0
|
||||
|
@ -1,5 +1,5 @@
|
||||
mock >= 2.0 # BSD
|
||||
testscenarios>=0.4
|
||||
testtools>=2.2.0
|
||||
tempest>=17.1.0 # Apache-2.0
|
||||
# unit tests requirements
|
||||
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
mock>=2.0 # BSD
|
||||
stestr>=2.0 # Apache-2.0
|
||||
|
@ -14,18 +14,10 @@
|
||||
# under the License.
|
||||
from __future__ import absolute_import
|
||||
|
||||
from tempest import config
|
||||
import testscenarios
|
||||
import testtools
|
||||
|
||||
from tobiko.common import constants
|
||||
from tobiko.common import clients
|
||||
import testtools
|
||||
|
||||
|
||||
class TobikoTest(testtools.testcase.WithAttributes,
|
||||
testscenarios.WithScenarios,
|
||||
testtools.TestCase):
|
||||
|
||||
default_params = constants.DEFAULT_PARAMS
|
||||
conf = config.CONF
|
||||
clientManager = clients.ClientManager()
|
||||
pass
|
||||
|
@ -20,12 +20,15 @@ import sys
|
||||
from tobiko.tests import base
|
||||
from tobiko.common.managers import stack
|
||||
from tobiko.common.managers import network
|
||||
from tobiko.common import clients
|
||||
from tobiko.common import constants
|
||||
|
||||
|
||||
class ScenarioTestsBase(base.TobikoTest):
|
||||
"""All scenario tests inherit from this scenario base class."""
|
||||
|
||||
clientManager = clients.ClientManager()
|
||||
default_params = constants.DEFAULT_PARAMS
|
||||
stack = None
|
||||
|
||||
def setUp(self):
|
||||
|
74
tox.ini
74
tox.ini
@ -1,13 +1,13 @@
|
||||
[tox]
|
||||
envlist = pep8,pylint,py35,py36,py27
|
||||
|
||||
minversion = 2.0
|
||||
envlist = pep8,pylint,py35,py27
|
||||
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
|
||||
install_command =
|
||||
pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||
[tobiko]
|
||||
deps =
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
@ -15,23 +15,34 @@ setenv =
|
||||
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
|
||||
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
|
||||
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
|
||||
PYTHON=coverage run --source tobiko --parallel-mode
|
||||
|
||||
whitelist_externals=
|
||||
find
|
||||
|
||||
[testenv]
|
||||
|
||||
commands =
|
||||
coverage erase
|
||||
find . -type f -name ".coverage*" -delete
|
||||
find . -type f -name "*.pyc" -delete
|
||||
coverage erase
|
||||
stestr --test-path ./tobiko/tests/cmd run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
find . -type f -name ".coverage*" -delete
|
||||
|
||||
deps =
|
||||
{[tobiko]deps}
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
|
||||
setenv =
|
||||
{[tobiko]setenv}
|
||||
PYTHON=coverage run --source tobiko --parallel-mode
|
||||
|
||||
usedevelop = True
|
||||
|
||||
whitelist_externals=
|
||||
find
|
||||
|
||||
|
||||
[testenv:neutron]
|
||||
basepython = python3
|
||||
@ -39,37 +50,60 @@ basepython = python3
|
||||
commands =
|
||||
stestr --test-path ./tobiko/tests/scenario run {posargs}
|
||||
|
||||
deps =
|
||||
{[tobiko]deps}
|
||||
-r{toxinidir}/neutron-requirements.txt
|
||||
|
||||
setenv =
|
||||
{[tobiko]setenv}
|
||||
PYTHON=python
|
||||
|
||||
|
||||
[testenv:venv]
|
||||
basepython = python3
|
||||
|
||||
deps =
|
||||
|
||||
commands =
|
||||
{posargs}
|
||||
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
{[testenv:neutron]deps}
|
||||
|
||||
setenv =
|
||||
{[tobiko]setenv}
|
||||
PYTHON=python
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-r{toxinidir}/pep8-requirements.txt
|
||||
|
||||
commands =
|
||||
flake8
|
||||
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
{[testenv:neutron]deps}
|
||||
-r{toxinidir}/pep8-requirements.txt
|
||||
|
||||
setenv =
|
||||
{[tobiko]setenv}
|
||||
PYTHON=python
|
||||
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python3
|
||||
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-r{toxinidir}/pylint-requirements.txt
|
||||
|
||||
commands =
|
||||
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]
|
||||
# E125 continuation line does not distinguish itself from next logical line
|
||||
|
@ -8,10 +8,12 @@
|
||||
- openstack-tox-pep8
|
||||
- openstack-tox-pylint
|
||||
- openstack-tox-py35
|
||||
- openstack-tox-py36
|
||||
- openstack-tox-py27
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-pep8
|
||||
- openstack-tox-pylint
|
||||
- openstack-tox-py35
|
||||
- openstack-tox-py36
|
||||
- openstack-tox-py27
|
Loading…
Reference in New Issue
Block a user