Merge "Enable zuul check and gate for unit tests"

This commit is contained in:
Zuul 2018-09-10 12:33:13 +00:00 committed by Gerrit Code Review
commit 406cb024d3
4 changed files with 62 additions and 3 deletions

View File

@ -6,9 +6,16 @@
voting: false voting: false
- sysinv-tox-unittest: - sysinv-tox-unittest:
voting: false voting: false
- controllerconfig-tox-flake8
- controllerconfig-tox-py27
- controllerconfig-tox-pylint
- configutilities-tox-flake8
gate: gate:
jobs: jobs:
- noop - controllerconfig-tox-flake8
- controllerconfig-tox-py27
- controllerconfig-tox-pylint
- configutilities-tox-flake8
- job: - job:
name: sysinv-tox-unittest name: sysinv-tox-unittest
@ -22,3 +29,44 @@
vars: vars:
tox_envlist: py27 tox_envlist: py27
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
- job:
name: controllerconfig-tox-flake8
parent: tox
description: Run flake8 tests for controllerconfig
required-projects:
- openstack/stx-update
- openstack/stx-fault
vars:
tox_envlist: flake8
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
- job:
name: controllerconfig-tox-py27
parent: tox
description: Run py27 tests for controllerconfig
required-projects:
- openstack/stx-update
- openstack/stx-fault
vars:
tox_envlist: py27
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
- job:
name: controllerconfig-tox-pylint
parent: tox
description: Run pylint tests for controllerconfig
required-projects:
- openstack/stx-update
- openstack/stx-fault
vars:
tox_envlist: pylint
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
- job:
name: configutilities-tox-flake8
parent: tox
description: Run flake8 tests for configutilities
vars:
tox_envlist: flake8
tox_extra_args: -c configutilities/configutilities/tox.ini

View File

@ -13,6 +13,9 @@ wrsdir = {toxinidir}/../../../../../../../../..
whitelist_externals = find whitelist_externals = find
install_command = pip install --no-cache-dir {opts} {packages} install_command = pip install --no-cache-dir {opts} {packages}
[testenv:venv]
commands = {posargs}
[testenv:flake8] [testenv:flake8]
basepython = python2.7 basepython = python2.7
deps = flake8 deps = flake8

View File

@ -7,8 +7,7 @@
envlist = flake8, py27, pylint envlist = flake8, py27, pylint
# Tox does not work if the path to the workdir is too long, so move it to /tmp # Tox does not work if the path to the workdir is too long, so move it to /tmp
toxworkdir = /tmp/{env:USER}_cctox toxworkdir = /tmp/{env:USER}_cctox
wrsdir = {toxinidir}/../../../.. stxdir = {toxinidir}/../../..
stxdir = {[tox]wrsdir}/stx
[testenv] [testenv]
whitelist_externals = find whitelist_externals = find
@ -21,6 +20,9 @@ deps = -r{toxinidir}/requirements.txt
-e{[tox]stxdir}/stx-config/sysinv/sysinv/sysinv -e{[tox]stxdir}/stx-config/sysinv/sysinv/sysinv
-e{[tox]stxdir}/stx-config/sysinv/cgts-client/cgts-client -e{[tox]stxdir}/stx-config/sysinv/cgts-client/cgts-client
[testenv:venv]
commands = {posargs}
[testenv:pylint] [testenv:pylint]
basepython = python2.7 basepython = python2.7
deps = {[testenv]deps} deps = {[testenv]deps}

View File

@ -38,3 +38,9 @@ commands =
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}
[testenv:flake8]
description = Dummy environment to allow flake8 to be run in subdir tox
[testenv:pylint]
description = Dummy environment to allow pylint to be run in subdir tox