# Tox (http://tox.testrun.org/) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" # and then run "tox" from this directory. [tox] envlist = flake8, py27, pylint # Tox does not work if the path to the workdir is too long, so move it to /tmp toxworkdir = /tmp/{env:USER}_cctox stxdir = {toxinidir}/../../.. [testenv] whitelist_externals = find install_command = pip install --no-cache-dir -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -e{[tox]stxdir}/stx-config/configutilities/configutilities -e{[tox]stxdir}/stx-fault/fm-api -e{[tox]stxdir}/stx-update/tsconfig/tsconfig -e{[tox]stxdir}/stx-config/sysinv/sysinv/sysinv -e{[tox]stxdir}/stx-config/sysinv/cgts-client/cgts-client [testenv:venv] commands = {posargs} [testenv:pylint] basepython = python2.7 deps = {[testenv]deps} commands = pylint {posargs} controllerconfig --rcfile=./pylint.rc --extension-pkg-whitelist=netifaces [testenv:flake8] basepython = python2.7 deps = flake8 commands = flake8 {posargs} [flake8] ignore = W503 [testenv:py27] basepython = python2.7 commands = find . -type f -name "*.pyc" -delete py.test {posargs} [testenv:cover] basepython = python2.7 deps = {[testenv]deps} commands = coverage erase python setup.py testr --coverage --testr-args='{posargs}' coverage xml