blob: 174a496ad99f9710ba952a156cde48cd1223a7f9 [file] [log] [blame]
James E. Blair1e8dd892012-05-30 09:15:05 -07001[tox]
zhaoxinyu363e5642013-09-18 16:05:24 -07002minversion = 1.6
Monty Taylor5f2feaf2013-09-19 07:47:01 -07003skipsdist = True
4envlist = pep8, py27
James E. Blairb0fcae42012-07-17 11:12:10 -07005
6[testenv]
James E. Blairf62d4282012-12-31 17:01:50 -08007# Set STATSD env variables so that statsd code paths are tested.
Ian Wienandff977bf2015-09-30 15:38:47 +10008setenv = STATSD_HOST=127.0.0.1
James E. Blairf62d4282012-12-31 17:01:50 -08009 STATSD_PORT=8125
Monty Taylorbc758832013-06-17 17:22:42 -040010 VIRTUAL_ENV={envdir}
James E. Blair267e5162017-04-07 10:08:20 -070011 OS_TEST_TIMEOUT=120
James E. Blair1c236df2017-02-01 14:07:24 -080012passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_LOG_DEFAULTS
Monty Taylor5f2feaf2013-09-19 07:47:01 -070013usedevelop = True
zhaoxinyu363e5642013-09-18 16:05:24 -070014install_command = pip install {opts} {packages}
Monty Taylor49983152013-06-02 08:42:01 -040015deps = -r{toxinidir}/requirements.txt
16 -r{toxinidir}/test-requirements.txt
Monty Taylorbc758832013-06-17 17:22:42 -040017commands =
Clark Boylan3b6bb102017-04-07 17:37:06 -070018 python setup.py test --slowest --testr-args='{posargs}'
James E. Blair1e8dd892012-05-30 09:15:05 -070019
Paul Belangere23f5992016-06-03 23:44:15 -040020[testenv:bindep]
21# Do not install any requirements. We want this to be fast and work even if
22# system dependencies are missing, since it's used to tell you what system
23# dependencies are missing! This also means that bindep must be installed
24# separately, outside of the requirements files.
25deps = bindep
26commands = bindep test
27
James E. Blair1e8dd892012-05-30 09:15:05 -070028[testenv:pep8]
Monty Taylor74fa3862016-06-02 07:39:49 +030029# streamer is python3 only, so we need to run flake8 in python3
30basepython = python3
Joshua Hesketh29d99b72014-08-19 16:27:42 +100031commands = flake8 {posargs}
James E. Blaircdd00072012-06-08 19:17:28 -070032
33[testenv:cover]
Monty Taylorbc758832013-06-17 17:22:42 -040034commands =
Clark Boylan3b6bb102017-04-07 17:37:06 -070035 python setup.py test --coverage
James E. Blairff986a12012-05-30 14:56:51 -070036
Monty Taylorffd90ea2014-09-08 13:47:38 -070037[testenv:docs]
Antoine Mussod70f3d82014-01-10 16:36:44 +010038commands = python setup.py build_sphinx
39
James E. Blaircdd00072012-06-08 19:17:28 -070040[testenv:venv]
41commands = {posargs}
James E. Blaircb462342013-01-15 10:03:53 -080042
43[testenv:validate-layout]
44commands = zuul-server -c etc/zuul.conf-sample -t -l {posargs}
Monty Taylor6bef8ef2013-06-02 08:17:12 -040045
James E. Blairf88b8172017-01-24 13:37:21 -080046[testenv:nodepool]
47setenv =
48 OS_TEST_PATH = ./tests/nodepool
Clark Boylan3b6bb102017-04-07 17:37:06 -070049commands = python setup.py test --slowest --testr-args='--concurrency=1 {posargs}'
James E. Blairf88b8172017-01-24 13:37:21 -080050
Monty Taylor6bef8ef2013-06-02 08:17:12 -040051[flake8]
Joshua Hesketh29d99b72014-08-19 16:27:42 +100052# These are ignored intentionally in openstack-infra projects;
53# please don't submit patches that solely correct them or enable them.
David Shrewsbury00457fe2017-05-18 14:22:55 -040054ignore = E305,E125,E129,E402,H,F405,W503
Monty Taylor6bef8ef2013-06-02 08:17:12 -040055show-source = True
56exclude = .venv,.tox,dist,doc,build,*.egg