2014-08-01 12:26:39 +01:00
|
|
|
[tox]
|
2017-03-29 08:33:09 +08:00
|
|
|
envlist = py{35,27},pep8,pylint,docs
|
2014-08-01 12:26:39 +01:00
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
usedevelop = True
|
|
|
|
deps =
|
2015-10-15 15:26:31 +01:00
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
2015-08-06 18:38:11 +01:00
|
|
|
passenv =
|
|
|
|
FREEZER_TEST_SSH_KEY
|
|
|
|
FREEZER_TEST_SSH_USERNAME
|
|
|
|
FREEZER_TEST_SSH_HOST
|
|
|
|
FREEZER_TEST_CONTAINER
|
|
|
|
FREEZER_TEST_OS_TENANT_NAME
|
|
|
|
FREEZER_TEST_OS_USERNAME
|
|
|
|
FREEZER_TEST_OS_REGION_NAME
|
|
|
|
FREEZER_TEST_OS_PASSWORD
|
|
|
|
FREEZER_TEST_OS_AUTH_URL
|
|
|
|
FREEZER_TEST_NO_LVM
|
2015-12-25 14:45:33 +05:30
|
|
|
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
2016-02-10 12:57:41 +00:00
|
|
|
|
2016-10-10 10:16:22 +08:00
|
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
2014-08-01 12:26:39 +01:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2014-11-22 17:00:56 +00:00
|
|
|
|
2015-10-15 15:26:31 +01:00
|
|
|
whitelist_externals =
|
2015-12-07 07:43:09 +00:00
|
|
|
find
|
2015-10-15 15:26:31 +01:00
|
|
|
coverage
|
|
|
|
rm
|
|
|
|
|
2016-02-10 12:57:41 +00:00
|
|
|
python_files = test_*.py
|
|
|
|
norecursedirs = .tox .venv
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
[testenv:py27]
|
|
|
|
basepython = python2.7
|
|
|
|
setenv =
|
2016-07-24 20:35:38 +05:30
|
|
|
OS_TEST_PATH = ./freezer/tests/unit
|
2015-10-15 15:26:31 +01:00
|
|
|
commands =
|
2015-12-07 07:43:09 +00:00
|
|
|
find . -type f -name "*.pyc" -delete
|
2015-10-15 15:26:31 +01:00
|
|
|
python setup.py testr --coverage --testr-args="{posargs}"
|
|
|
|
coverage report -m
|
|
|
|
rm -f .coverage
|
2016-02-10 12:57:41 +00:00
|
|
|
rm -rf .testrepository
|
2015-10-15 15:26:31 +01:00
|
|
|
|
2016-11-17 14:49:59 +00:00
|
|
|
[testenv:py35]
|
|
|
|
basepython = python3.5
|
|
|
|
setenv =
|
|
|
|
OS_TEST_PATH = ./freezer/tests/unit
|
|
|
|
commands =
|
|
|
|
find . -type f -name "*.pyc" -delete
|
|
|
|
python setup.py testr --coverage --testr-args="{posargs}"
|
|
|
|
coverage report -m
|
|
|
|
rm -f .coverage
|
|
|
|
rm -rf .testrepository
|
|
|
|
|
2016-02-04 22:53:26 +00:00
|
|
|
[testenv:docs]
|
2017-04-26 17:41:47 +00:00
|
|
|
whitelist_externals = rm
|
|
|
|
bash
|
2016-02-04 22:53:26 +00:00
|
|
|
commands =
|
2017-09-13 15:03:19 -06:00
|
|
|
rm -rf doc/build/
|
2016-02-04 22:53:26 +00:00
|
|
|
python setup.py build_sphinx
|
2017-09-13 15:03:19 -06:00
|
|
|
|
2016-02-04 22:53:26 +00:00
|
|
|
|
2014-08-01 12:26:39 +01:00
|
|
|
[testenv:pep8]
|
|
|
|
commands = flake8 freezer
|
|
|
|
|
2015-06-14 21:59:41 +01:00
|
|
|
[testenv:pylint]
|
2015-10-23 15:12:31 +01:00
|
|
|
commands = pylint --rcfile .pylintrc freezer
|
2015-06-14 21:59:41 +01:00
|
|
|
|
2014-08-01 12:26:39 +01:00
|
|
|
[flake8]
|
2016-06-16 16:09:48 -06:00
|
|
|
ignore = H405,H404,H403,H401
|
2014-08-01 12:26:39 +01:00
|
|
|
show-source = True
|
2017-06-22 16:31:09 +08:00
|
|
|
enable-extensions = H203,H106
|
2016-11-22 19:52:52 +03:00
|
|
|
exclude = .venv,.tox,dist,doc,test,*egg,releasenotes
|
2016-10-21 09:51:37 +00:00
|
|
|
|
|
|
|
[testenv:releasenotes]
|
|
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|