92 lines
2.6 KiB
INI
92 lines
2.6 KiB
INI
[tox]
|
|
minversion = 2.1
|
|
skipsdist = True
|
|
envlist = py26,py27,pep8,functional,cleanup
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install --allow-external -U {opts} {packages}
|
|
whitelist_externals = bash
|
|
oslo_debug_helper
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
ARTIFACTS={toxinidir}/test_run
|
|
FUELCLIENT_JUNIT=fuelclient-{envname}.xml
|
|
FUELCLIENT_CUSTOM_SETTINGS={toxinidir}/test_run/fuel_client_config.yaml
|
|
|
|
# Functional env settings
|
|
FUEL_WEB_CLONE=yes
|
|
FUEL_WEB_REPO=https://github.com/stackforge/fuel-web.git
|
|
FETCH_REPO=
|
|
FETCH_REFSPEC=
|
|
FUEL_COMMIT=master
|
|
NAILGUN_ROOT=/tmp/fuel_web/nailgun
|
|
|
|
# Nailgun server parameters
|
|
NAILGUN_PORT=8003
|
|
NAILGUN_CHECK_PATH=/api/version
|
|
NAILGUN_START_MAX_WAIT_TIME=20
|
|
|
|
# NOTE(romcheg): this is a temporary change to work around
|
|
# a bug in tox 2.2.1
|
|
# Don't forget to set up all these variables,
|
|
# manually if you're trying to run tests on
|
|
# your local environment.
|
|
passenv = FUEL_WEB_ROOT TEST_NAILGUN_DB
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
bash -c "TESTS_DIR={posargs:./fuelclient/tests/unit} python setup.py test --slowest"
|
|
|
|
[testenv:functional]
|
|
commands =
|
|
bash {toxinidir}/tools/cleanup.sh
|
|
bash {toxinidir}/tools/prepare_nailgun.sh
|
|
bash -c "TESTS_DIR={posargs:./fuelclient/tests/functional} python setup.py test --slowest"
|
|
|
|
[testenv:dbgunit]
|
|
commands = oslo_debug_helper -t {toxinidir}/fuelclient/tests/unit {posargs}
|
|
|
|
[testenv:dbgfunc]
|
|
commands =
|
|
bash {toxinidir}/tools/cleanup.sh
|
|
bash {toxinidir}/tools/prepare_nailgun.sh
|
|
oslo_debug_helper -t {toxinidir}/fuelclient/tests/functional {posargs}
|
|
|
|
[testenv:cleanup]
|
|
commands =
|
|
bash {toxinidir}/tools/cleanup.sh
|
|
bash -c "find {toxinidir} -name \"*.pyc\" -delete"
|
|
|
|
[tox:jenkins]
|
|
downloadcache = ~/cache/pip
|
|
|
|
[testenv:pep8]
|
|
deps = hacking==0.10
|
|
usedevelop = False
|
|
commands =
|
|
flake8 {posargs:fuelclient}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
bash -c "TESTS_DIR={posargs:./fuelclient/tests/unit} python setup.py testr --coverage"
|
|
|
|
[testenv:venv]
|
|
commands = {posargs:}
|
|
|
|
[testenv:devenv]
|
|
envdir = devenv
|
|
usedevelop = True
|
|
|
|
[flake8]
|
|
# TODO(romcheg): Most of there exceptions must be removed when
|
|
# old CLI is removed.
|
|
ignore = H234,H302,H802,H405
|
|
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
|
|
show-pep8 = True
|
|
show-source = True
|
|
count = True
|
|
|
|
[hacking]
|
|
import_exceptions = testtools.matchers
|