
* shellcheck utility allow to determinate common mistakes of bash scripting[1] * yamllint utility allow to determinate common mistakes of yaml files[3] * Add List system dependencies for running common tests Add an other-requirements.txt file containing a cross-platform list of dependencies needed for running included tox-based tests. Also include a tox environment for convenience calling the bindep[2] utility to list any missing system requirements. For other-requirements.txt see also: http://docs.openstack.org/infra/manual/drivers.html#package-requirements [1] http://hackage.haskell.org/package/ShellCheck [2] http://docs.openstack.org/infra/bindep/ [3] https://pypi.python.org/pypi/yamllint/ Change-Id: Ia2498bdb0f7c310ec3d2c2f11f5d3fc08c8b352c
75 lines
2.1 KiB
INI
75 lines
2.1 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = py27
|
|
skip_missing_interpreters = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
LANG=en_US.UTF-8
|
|
LANGUAGE=en_US:en
|
|
LC_ALL=C
|
|
passenv = OS_* MURANO* *ENDPOINT*
|
|
deps=
|
|
pytz
|
|
extras
|
|
python-subunit
|
|
debtcollector
|
|
-r{toxinidir}/test-requirements.txt
|
|
distribute = false
|
|
|
|
[testenv:venv]
|
|
commands = {posargs:}
|
|
|
|
[testenv:deploy_cicd_apps]
|
|
# FIXME!
|
|
commands = python -m unittest tests.test_cicd_apps.MuranoCiCdTest.test_deploy_cicd
|
|
#commands = python setup.py testr --testr-args='{posargs}'
|
|
|
|
[testenv:hacking]
|
|
deps=
|
|
ipdb
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands = python -m unittest tests.test_cicd_apps.MuranoCiCdTest.test_deploy_cicd
|
|
|
|
[testenv:units]
|
|
# FIXME!
|
|
commands = python -m unittest unittests.test_namespaces.TestNamespaces.test_namespaces
|
|
|
|
[testenv:bindep]
|
|
# Do not install any requirements. We want this to be fast and work even if
|
|
# system dependencies are missing, since it's used to tell you what system
|
|
# dependencies are missing! This also means that bindep must be installed
|
|
# separately, outside of the requirements files.
|
|
deps = bindep
|
|
commands = bindep test
|
|
|
|
[testenv:shellcheck]
|
|
# 'shellcheck' is not an Python package, so it can be run w\o
|
|
# virtual env. But tox is a usable wrapper to run any kind of tests -
|
|
# let's use it for common test-run as well - for unification purposes.
|
|
whitelist_externals = shellcheck
|
|
commands = {toxinidir}/tools/jenkins/shellcheck.sh {toxinidir}
|
|
|
|
[testenv:yaml-syntaxcheck]
|
|
deps = yamllint
|
|
commands = {toxinidir}/tools/jenkins/yamllint.sh {toxinidir}
|
|
|
|
[testenv:linters]
|
|
# linters env - it's a combination of check's (usually syntax)
|
|
# for aggregate non-destructive run's. Used only in openstack-infra ci for
|
|
# decrease resource usage.
|
|
# Current duplicate list:
|
|
# shellcheck
|
|
# yaml-syntaxcheck
|
|
#
|
|
# We need to suppress exit code from 'command1', to be able run 'command2';
|
|
# Otherwise, if some command failed - exit code from tox itself will be 1
|
|
ignore_errors=True
|
|
deps = yamllint
|
|
whitelist_externals = shellcheck
|
|
commands =
|
|
{toxinidir}/tools/jenkins/shellcheck.sh {toxinidir}
|
|
{toxinidir}/tools/jenkins/yamllint.sh {toxinidir}
|
|
|