76 lines
2.0 KiB
INI
76 lines
2.0 KiB
INI
[tox]
|
|
envlist = linters,pep8
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
PYTHONDONTWRITEBYTECODE=True
|
|
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:linters]
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
|
|
-o \( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs -0 yamllint"
|
|
bash -c "ls cgcs-patch/bin/*.sh | xargs bashate -v -iE006 {posargs}"
|
|
|
|
[pep8]
|
|
# Ignoring these warnings
|
|
# E501 line too long
|
|
|
|
ignore = E501
|
|
|
|
[testenv:pep8]
|
|
usedevelop = False
|
|
skip_install = True
|
|
deps =
|
|
pep8
|
|
commands =
|
|
pep8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[nosetests]
|
|
verbosity=2
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
deps = {[testenv]deps}
|
|
{toxinidir}/nfv/nfv-client
|
|
{toxinidir}/nfv/nfv-common
|
|
{toxinidir}/nfv/nfv-plugins
|
|
{toxinidir}/nfv/nfv-vim
|
|
whitelist_externals = cp
|
|
find
|
|
recreate = True
|
|
commands = {[testenv]commands}
|
|
cp -v nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_18.03_GA {envdir}/
|
|
nosetests --exe -w nfv/nfv-tests/nfv_unit_tests/tests/ '{posargs}'
|
|
|
|
[testenv:py35]
|
|
basepython = python3
|
|
deps = {[testenv]deps}
|
|
nfv/nfv-client
|
|
nfv/nfv-common
|
|
nfv/nfv-plugins
|
|
nfv/nfv-vim
|
|
whitelist_externals = cp
|
|
find
|
|
recreate = True
|
|
commands = {[testenv]commands}
|
|
cp -v nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_18.03_GA {envdir}/
|
|
nosetests --exe -w nfv/nfv-tests/nfv_unit_tests/tests/ '{posargs}'
|
|
|