Run a subset of tests on Python 3.4: only run test_utils currently. With a working "tox -e py34", the py34 check job can be made voting. A voting check job ensures that no code incompatible with Python 3 will be added back to the code tested by "tox -e py34". It avoids the risk of having to port the same code twice to Python 3. When more tests are ported to Python 3.4, the whitelist of tests will grow slowly. The goal is to remove the [testenv:py34] section from tox.ini to run all tests on Python 3.4. Change-Id: I164d2ff3d948c8339edcfd96abc46d869018a324
79 lines
2.3 KiB
INI
79 lines
2.3 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
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
ARTIFACTS={toxinidir}/{env:ARTIFACTS:test_run}
|
|
FUELCLIENT_JUNIT={env:FUELCLIENT_JUNIT:fuelclient}-{envname}.xml
|
|
FUELCLIENT_CUSTOM_SETTINGS={toxinidir}/{env:ARTIFACTS:test_run}/fuel_client_config.yaml
|
|
|
|
# Functional env settings
|
|
FUEL_WEB_CLONE={env:FUEL_WEB_CLONE:yes}
|
|
FUEL_WEB_REPO={env:FUEL_WEB_REPO:https://github.com/stackforge/fuel-web.git}
|
|
FUEL_WEB_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web}
|
|
FETCH_REPO={env:FETCH_REPO:}
|
|
FETCH_REFSPEC={env:FETCH_REFSPEC:}
|
|
FUEL_COMMIT={env:FUEL_COMMIT:master}
|
|
NAILGUN_ROOT={env:FUEL_WEB_ROOT:/tmp/fuel_web}/nailgun
|
|
|
|
# Nailgun server parameters
|
|
NAILGUN_PORT={env:NAILGUN_PORT:8003}
|
|
NAILGUN_CHECK_PATH={env:NAILGUN_CHECK_PATH:/api/version}
|
|
NAILGUN_START_MAX_WAIT_TIME={env:NAILGUN_START_MAX_WAIT_TIME:20}
|
|
TEST_NAILGUN_DB={env:TEST_NAILGUN_DB:nailgun}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
py.test -vv --junit-xml $FUELCLIENT_JUNIT {posargs:fuelclient/tests/unit}
|
|
|
|
[testenv:py34]
|
|
commands =
|
|
py.test {posargs} \
|
|
fuelclient/tests/unit/common/test_utils.py
|
|
|
|
[testenv:functional]
|
|
commands =
|
|
bash {toxinidir}/tools/cleanup.sh
|
|
bash {toxinidir}/tools/prepare_nailgun.sh
|
|
py.test -vv --junit-xml $FUELCLIENT_JUNIT {posargs:fuelclient/tests/functional}
|
|
|
|
[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.7
|
|
usedevelop = False
|
|
commands =
|
|
flake8 {posargs:fuelclient}
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
py.test -vv --junit-xml $FUELCLIENT_JUNIT --cov=fuelclient {posargs:fuelclient/tests/unit}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs:}
|
|
|
|
[testenv:devenv]
|
|
envdir = devenv
|
|
usedevelop = True
|
|
|
|
[flake8]
|
|
ignore = H234,H302,H802
|
|
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
|