James E. Blair | 1e8dd89 | 2012-05-30 09:15:05 -0700 | [diff] [blame] | 1 | [tox] |
zhaoxinyu | 363e564 | 2013-09-18 16:05:24 -0700 | [diff] [blame] | 2 | minversion = 1.6 |
Monty Taylor | 5f2feaf | 2013-09-19 07:47:01 -0700 | [diff] [blame] | 3 | skipsdist = True |
| 4 | envlist = pep8, py27 |
James E. Blair | b0fcae4 | 2012-07-17 11:12:10 -0700 | [diff] [blame] | 5 | |
| 6 | [testenv] |
James E. Blair | f62d428 | 2012-12-31 17:01:50 -0800 | [diff] [blame] | 7 | # Set STATSD env variables so that statsd code paths are tested. |
Ian Wienand | ff977bf | 2015-09-30 15:38:47 +1000 | [diff] [blame] | 8 | setenv = STATSD_HOST=127.0.0.1 |
James E. Blair | f62d428 | 2012-12-31 17:01:50 -0800 | [diff] [blame] | 9 | STATSD_PORT=8125 |
Monty Taylor | bc75883 | 2013-06-17 17:22:42 -0400 | [diff] [blame] | 10 | VIRTUAL_ENV={envdir} |
James E. Blair | d0e579a | 2013-12-23 15:41:23 -0800 | [diff] [blame] | 11 | OS_TEST_TIMEOUT=30 |
James E. Blair | 10fc1eb | 2016-12-21 16:16:25 -0800 | [diff] [blame] | 12 | OS_LOG_DEFAULTS={env:OS_LOG_DEFAULTS:gear=WARNING} |
David Shrewsbury | 6b18481 | 2016-06-01 11:41:03 -0400 | [diff] [blame] | 13 | passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE |
Monty Taylor | 5f2feaf | 2013-09-19 07:47:01 -0700 | [diff] [blame] | 14 | usedevelop = True |
zhaoxinyu | 363e564 | 2013-09-18 16:05:24 -0700 | [diff] [blame] | 15 | install_command = pip install {opts} {packages} |
Monty Taylor | 4998315 | 2013-06-02 08:42:01 -0400 | [diff] [blame] | 16 | deps = -r{toxinidir}/requirements.txt |
| 17 | -r{toxinidir}/test-requirements.txt |
Monty Taylor | bc75883 | 2013-06-17 17:22:42 -0400 | [diff] [blame] | 18 | commands = |
| 19 | python setup.py testr --slowest --testr-args='{posargs}' |
James E. Blair | 1e8dd89 | 2012-05-30 09:15:05 -0700 | [diff] [blame] | 20 | |
Paul Belanger | e23f599 | 2016-06-03 23:44:15 -0400 | [diff] [blame] | 21 | [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. |
| 26 | deps = bindep |
| 27 | commands = bindep test |
| 28 | |
James E. Blair | 1e8dd89 | 2012-05-30 09:15:05 -0700 | [diff] [blame] | 29 | [testenv:pep8] |
Monty Taylor | 74fa386 | 2016-06-02 07:39:49 +0300 | [diff] [blame] | 30 | # streamer is python3 only, so we need to run flake8 in python3 |
| 31 | basepython = python3 |
Joshua Hesketh | 29d99b7 | 2014-08-19 16:27:42 +1000 | [diff] [blame] | 32 | commands = flake8 {posargs} |
James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame] | 33 | |
| 34 | [testenv:cover] |
Monty Taylor | bc75883 | 2013-06-17 17:22:42 -0400 | [diff] [blame] | 35 | commands = |
| 36 | python setup.py testr --coverage |
James E. Blair | ff986a1 | 2012-05-30 14:56:51 -0700 | [diff] [blame] | 37 | |
Monty Taylor | ffd90ea | 2014-09-08 13:47:38 -0700 | [diff] [blame] | 38 | [testenv:docs] |
Antoine Musso | d70f3d8 | 2014-01-10 16:36:44 +0100 | [diff] [blame] | 39 | commands = python setup.py build_sphinx |
| 40 | |
James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame] | 41 | [testenv:venv] |
| 42 | commands = {posargs} |
James E. Blair | cb46234 | 2013-01-15 10:03:53 -0800 | [diff] [blame] | 43 | |
| 44 | [testenv:validate-layout] |
| 45 | commands = zuul-server -c etc/zuul.conf-sample -t -l {posargs} |
Monty Taylor | 6bef8ef | 2013-06-02 08:17:12 -0400 | [diff] [blame] | 46 | |
| 47 | [flake8] |
Joshua Hesketh | 29d99b7 | 2014-08-19 16:27:42 +1000 | [diff] [blame] | 48 | # These are ignored intentionally in openstack-infra projects; |
| 49 | # please don't submit patches that solely correct them or enable them. |
| 50 | ignore = E125,E129,H |
Monty Taylor | 6bef8ef | 2013-06-02 08:17:12 -0400 | [diff] [blame] | 51 | show-source = True |
| 52 | exclude = .venv,.tox,dist,doc,build,*.egg |