blob: 9c2daee4afcf93754c8ddddd5e0bc689c77a8309 [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. Blaird0e579a2013-12-23 15:41:23 -080011 OS_TEST_TIMEOUT=30
James E. Blair10fc1eb2016-12-21 16:16:25 -080012 OS_LOG_DEFAULTS={env:OS_LOG_DEFAULTS:gear=WARNING}
David Shrewsbury6b184812016-06-01 11:41:03 -040013passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
Monty Taylor5f2feaf2013-09-19 07:47:01 -070014usedevelop = True
zhaoxinyu363e5642013-09-18 16:05:24 -070015install_command = pip install {opts} {packages}
Monty Taylor49983152013-06-02 08:42:01 -040016deps = -r{toxinidir}/requirements.txt
17 -r{toxinidir}/test-requirements.txt
Monty Taylorbc758832013-06-17 17:22:42 -040018commands =
19 python setup.py testr --slowest --testr-args='{posargs}'
James E. Blair1e8dd892012-05-30 09:15:05 -070020
Paul Belangere23f5992016-06-03 23:44:15 -040021[testenv:bindep]
22# Do not install any requirements. We want this to be fast and work even if
23# system dependencies are missing, since it's used to tell you what system
24# dependencies are missing! This also means that bindep must be installed
25# separately, outside of the requirements files.
26deps = bindep
27commands = bindep test
28
James E. Blair1e8dd892012-05-30 09:15:05 -070029[testenv:pep8]
Monty Taylor74fa3862016-06-02 07:39:49 +030030# streamer is python3 only, so we need to run flake8 in python3
31basepython = python3
Joshua Hesketh29d99b72014-08-19 16:27:42 +100032commands = flake8 {posargs}
James E. Blaircdd00072012-06-08 19:17:28 -070033
34[testenv:cover]
Monty Taylorbc758832013-06-17 17:22:42 -040035commands =
36 python setup.py testr --coverage
James E. Blairff986a12012-05-30 14:56:51 -070037
Monty Taylorffd90ea2014-09-08 13:47:38 -070038[testenv:docs]
Antoine Mussod70f3d82014-01-10 16:36:44 +010039commands = python setup.py build_sphinx
40
James E. Blaircdd00072012-06-08 19:17:28 -070041[testenv:venv]
42commands = {posargs}
James E. Blaircb462342013-01-15 10:03:53 -080043
44[testenv:validate-layout]
45commands = zuul-server -c etc/zuul.conf-sample -t -l {posargs}
Monty Taylor6bef8ef2013-06-02 08:17:12 -040046
47[flake8]
Joshua Hesketh29d99b72014-08-19 16:27:42 +100048# These are ignored intentionally in openstack-infra projects;
49# please don't submit patches that solely correct them or enable them.
50ignore = E125,E129,H
Monty Taylor6bef8ef2013-06-02 08:17:12 -040051show-source = True
52exclude = .venv,.tox,dist,doc,build,*.egg