Set up initial Gerrit requirements
* Add .gitreview * Add .zuul.yaml with basic linters and pep8 jobs * Fix up tox.ini to run linters and pep8 environments. This changed some leagacy config in the default testenv that will affect the more specific environments. Change-Id: Ieca279a240b8705dcb73d9d195e1658a40e199e1 Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
f8f4a8b560
commit
be7da964fd
4
.gitreview
Normal file
4
.gitreview
Normal file
@ -0,0 +1,4 @@
|
||||
[gerrit]
|
||||
host=review.openstack.org
|
||||
port=29418
|
||||
project=openstack/stx-distcloud.git
|
10
.zuul.yaml
Normal file
10
.zuul.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
---
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
- openstack-tox-pep8:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
@ -20,3 +20,6 @@ os-testr>=0.8.0 # Apache-2.0
|
||||
tempest-lib>=0.14.0 # Apache-2.0
|
||||
ddt>=1.0.1 # MIT
|
||||
pylint==1.7.1 # GPLv2
|
||||
|
||||
PyYAML>=3.1.0
|
||||
yamllint>=0.5.2
|
||||
|
49
tox.ini
49
tox.ini
@ -1,32 +1,31 @@
|
||||
[tox]
|
||||
minversion = 1.6
|
||||
envlist = py27,pep8
|
||||
# Tox does not work if the path to the workdir is too long, so move it to /tmp
|
||||
toxworkdir = /tmp/{env:USER}_distributedcloud
|
||||
#skipsdist = True
|
||||
envlist = linters,pep8
|
||||
minversion = 2.3
|
||||
skipsdist = True
|
||||
|
||||
[testenv]
|
||||
#usedevelop = True
|
||||
basepython = python3
|
||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
OS_STDOUT_CAPTURE=1
|
||||
OS_STDERR_CAPTURE=1
|
||||
OS_TEST_TIMEOUT=60
|
||||
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
||||
DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
||||
# DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
||||
|
||||
deps = keyring
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-e{toxinidir}/../../middleware/config/recipes-common/tsconfig/tsconfig
|
||||
-e{toxinidir}/../../middleware/config/recipes-control/configutilities/configutilities
|
||||
-e{toxinidir}/../../middleware/sysinv/recipes-common/sysinv/sysinv
|
||||
-e{toxinidir}/../../middleware/fault/recipes-common/fm-api
|
||||
-e{toxinidir}/../../middleware/patching/recipes-common/cgcs-patch/cgcs-patch
|
||||
-e{toxinidir}/../../middleware/sysinv/recipes-common/cgts-client/cgts-client
|
||||
-e{toxinidir}/../../recipes-nfv/nfv/nfv-client
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
#deps = keyring
|
||||
# -r{toxinidir}/requirements.txt
|
||||
# -r{toxinidir}/test-requirements.txt
|
||||
# -e{toxinidir}/../../middleware/config/recipes-common/tsconfig/tsconfig
|
||||
# -e{toxinidir}/../../middleware/config/recipes-control/configutilities/configutilities
|
||||
# -e{toxinidir}/../../middleware/sysinv/recipes-common/sysinv/sysinv
|
||||
# -e{toxinidir}/../../middleware/fault/recipes-common/fm-api
|
||||
# -e{toxinidir}/../../middleware/patching/recipes-common/cgcs-patch/cgcs-patch
|
||||
# -e{toxinidir}/../../middleware/sysinv/recipes-common/cgts-client/cgts-client
|
||||
# -e{toxinidir}/../../recipes-nfv/nfv/nfv-client
|
||||
|
||||
commands =
|
||||
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||
python setup_ddt_tests.py testr --slowest --testr-args='{posargs}'
|
||||
whitelist_externals =
|
||||
rm
|
||||
find
|
||||
@ -96,3 +95,13 @@ deps = {[testenv]deps}
|
||||
commands =
|
||||
pylint {posargs} dcmanager dcorch --rcfile=./pylint.rc
|
||||
|
||||
[testenv:linters]
|
||||
# bashate ignore:
|
||||
# E006 - accept long lines
|
||||
# E040 - false positive on |& syntax (new in bash 4)
|
||||
whitelist_externals = bash
|
||||
commands =
|
||||
bash -c "find {toxinidir} \
|
||||
\( -name .tox -prune \) \
|
||||
-o -type f -name '*.yaml' \
|
||||
-print0 | xargs -0 yamllint"
|
||||
|
Loading…
x
Reference in New Issue
Block a user