fuel-web/tox.ini
Dmitry Guryanov f4851820d3 run extensions tests in 4 threads
Let's run extensions tests as we do it for nailgun tests,
in 4 threads.

Change-Id: I56329267cbb80c5015468d5cf1387978e1db0fd4
2016-09-05 10:44:45 +00:00

107 lines
3.2 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
setupdir = {toxinidir}/nailgun
envlist = py27,py34,pep8
[base]
ARTS = {env:ARTS:test_run}
TOOLS = {toxinidir}/nailgun/tools
[common]
changedir={toxinidir}/nailgun
setenv =
DB_ROOT={env:DB_ROOT:postgres}
DB_ROOTPW={env:DB_ROOTPW:insecure_slave}
DB_ROOTPGPASS={[base]ARTS}/pgpass
NAILGUN_DB_PREPARE={env:NAILGUN_DB_PREPARE:yes}
NAILGUN_DB={env:NAILGUN_DB:openstack_citest}
NAILGUN_DB_HOST={env:NAILGUN_DB_HOST:127.0.0.1}
NAILGUN_DB_PORT={env:NAILGUN_DB_PORT:5432}
NAILGUN_DB_USER={env:NAILGUN_DB_USER:openstack_citest}
NAILGUN_DB_USERPW={env:NAILGUN_DB_USERPW:openstack_citest}
NAILGUN_ROOT={toxinidir}/nailgun
NAILGUN_STATIC={env:NAILGUN_STATIC:static}
NAILGUN_TEMPLATES={env:NAILGUN_TEMPLATES:static}
NAILGUN_FIXTURE_FILES={env:NAILGUN_FIXTURE_FILES:}
NAILGUN_CONFIG={[base]ARTS}/test.yaml
NAILGUN_LOGS={[base]ARTS}
NAILGUN_PORT={env:NAILGUN_PORT:8000}
NAILGUN_START_MAX_WAIT_TIME=20
NAILGUN_CHECK_URL=/api/version
[testenv]
usedevelop = True
install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash
python
changedir={toxinidir}/nailgun
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/nailgun/test-requirements.txt
commands =
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
py.test -vv --cleandb --junit-xml {toxinidir}/nailgun/nailgun.xml -m 'not performance' -n 4 {posargs:nailgun/test}
py.test -vv --junit-xml {toxinidir}/nailgun/extensions.xml -n 4 {posargs:nailgun/extensions}
[testenv:performance]
commands =
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
py.test -vv --cleandb --junit-xml {toxinidir}/nailgun/nailgun.xml -m 'performance' -n 4 {posargs:nailgun/test}
[testenv:cleanup]
usedevelop = False
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
deps =
commands =
bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_database"
bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_env"
[testenv:start]
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
deps = -r{toxinidir}/nailgun/requirements.txt
commands =
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_database"
bash -c "{[base]TOOLS}/env.sh prepare_nailgun_server"
[testenv:stop]
usedevelop = False
setenv = VIRTUAL_ENV={envdir}
{[common]setenv}
deps =
commands =
bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_server"
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
deps = -r{toxinidir}/nailgun/test-requirements.txt
commands = {posargs:}
[testenv:pep8]
deps = hacking==0.10
usedevelop = False
commands =
flake8 {posargs:nailgun}
[flake8]
# NOTE(eli): H304 is "No relative imports" error, relative
# imports are required for extensions which can be moved
# from nailgun directory to different place
ignore = H234,H302,H802,H304
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