git-review/tox.ini
Yuriy Taraday 33081ce1d6 Use hash of test ID to pick Gerrit ports in tests
This eliminates need for 127.* IPs mapped to loopback interface (which
is true only for Linux) and makes test site generation even more
predictable (name of site dir for a test is the same on any machine).

Hash function used is md5(test_id) % 10000 which is enough for now. This
function is checked for collisions before every run in tox.ini, so if
someone happens to add test that will cause a collision, it'll be
immediately visible. Hash function can be changed to anything else that
maps test ID string to a number in [0,10000].

Change-Id: Ib05d9b489a80e4f55c84db2f8bea20b88e959649
2016-08-15 17:41:30 +01:00

34 lines
738 B
INI

[tox]
envlist = py26,py27,py32,py33,py34,pep8
[testenv]
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
commands =
python -m git_review.tests.check_test_id_hashes discover --list
python -m git_review.tests.prepare
python setup.py testr --slowest --testr-args='--concurrency=2 {posargs}'
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
commands = flake8
[testenv:sdist]
commands = python setup.py sdist {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:venv]
commands = {posargs}
[flake8]
ignore = E125,H202,H405,H904
show-source = True
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build