
The lab-setup files are refactored, as detailed below. In addition, recovery, administration and logging improvements are implemented. The following lab-setup files are removed: - lab_setup1.sh - lab_setup2.sh The corresponding code, previously run locally in the VM, is now integrated to the main Python code. The files lab_setup.sh and lab_setup.conf are kept, because they are useful to populate the stx-openStack application. These should be reviewed by a new task under the context of stx-openStack. Test Plan - AIO-SX Virtual Deployment (PASS) - AIO-DX Virtual Deployment (PASS) Story: 2005051 Task: 48402 Change-Id: I940e5a16ea98a4325efe1ee0dd45127674d6b192 Signed-off-by: Roger Ferraz <rogerio.ferraz@encora.com>
54 lines
1.7 KiB
INI
54 lines
1.7 KiB
INI
[tox]
|
|
envlist = linters,pylint,unittests
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
deps = -r{toxinidir}/requirements/test-requirements.txt
|
|
allowlist_externals = reno
|
|
|
|
[testenv:linters]
|
|
basepython = python3
|
|
# bashate ignore:
|
|
# E006 - accept long lines
|
|
# E040 - false positive on |& syntax (new in bash 4)
|
|
allowlist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
\( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-not \( -type f -path *template* -prune \) \
|
|
-print0 | xargs -0 yamllint"
|
|
bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs -0 bashate -v -iE006,E040,E042"
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
sitepackages = False
|
|
setenv =
|
|
BASEPATH = {toxinidir}/virtualbox/pybox
|
|
PYTHONPATH= {env:BASEPATH}:{env:BASEPATH}/helper:{env:BASEPATH}/consts:{env:BASEPATH}/utils
|
|
deps =
|
|
-r{env:BASEPATH}/requirements.txt
|
|
{[testenv]deps}
|
|
allowlist_externals = pylint
|
|
commands = pylint {posargs} --rcfile=./pylint.rc virtualbox/pybox libvirt
|
|
|
|
[testenv:unittests]
|
|
basepython = python3
|
|
setenv =
|
|
BASEPATH = {toxinidir}/virtualbox/pybox
|
|
PYTHONPATH= {env:BASEPATH}:{env:BASEPATH}/helper:{env:BASEPATH}/consts:{env:BASEPATH}/utils
|
|
deps =
|
|
-r{toxinidir}/virtualbox/pybox/requirements.txt
|
|
coverage
|
|
change_dir = {env:BASEPATH}
|
|
commands =
|
|
coverage run -m unittest discover
|
|
coverage report -m
|