Load balancing services for OpenStack Neutron.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

111 lines
3.1KB

  1. [tox]
  2. envlist = py27,py34,pep8
  3. minversion = 1.6
  4. skipsdist = True
  5. [testenv]
  6. setenv = VIRTUAL_ENV={envdir}
  7. usedevelop = True
  8. install_command = {toxinidir}/tools/tox_install.sh {opts} {packages}
  9. deps = -r{toxinidir}/test-requirements.txt
  10. whitelist_externals = sh
  11. commands =
  12. sh tools/pretty_tox.sh '{posargs}'
  13. # there is also secret magic in pretty_tox.sh which lets you run in a fail only
  14. # mode. To do this define the TRACE_FAILONLY environmental variable.
  15. [tox:jenkins]
  16. sitepackages = True
  17. downloadcache = ~/cache/pip
  18. [testenv:pep8]
  19. deps =
  20. {[testenv]deps}
  21. pylint
  22. commands =
  23. flake8
  24. pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_lbaas}
  25. neutron-db-manage --subproject neutron-lbaas --config-file neutron_lbaas/tests/etc/neutron.conf check_migration
  26. whitelist_externals = sh
  27. [testenv:i18n]
  28. commands = python ./tools/check_i18n.py ./neutron_lbaas ./tools/i18n_cfg.py
  29. [testenv:cover]
  30. commands =
  31. python setup.py testr --coverage --coverage-package-name=neutron_lbaas --testr-args='{posargs}'
  32. [testenv:venv]
  33. commands = {posargs}
  34. [testenv:docs]
  35. commands = python setup.py build_sphinx
  36. [testenv:py34]
  37. commands = python -m testtools.run \
  38. neutron_lbaas.tests.unit.common.cert_manager.test_barbican
  39. [flake8]
  40. # E125 continuation line does not distinguish itself from next logical line
  41. # E126 continuation line over-indented for hanging indent
  42. # E128 continuation line under-indented for visual indent
  43. # E129 visually indented line with same indent as next logical line
  44. # E265 block comment should start with ‘# ‘
  45. # H305 imports not grouped correctly
  46. # H405 multi line docstring summary not separated with an empty line
  47. # TODO(marun) H404 multi line docstring should start with a summary
  48. # N324 contextlib.nested is deprecated
  49. ignore = E125,E126,E128,E129,E265,H305,H404,H405,N324
  50. show-source = true
  51. builtins = _
  52. exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios,neutron_lbaas/tests/tempest/lib,neutron_lbaas/tests/tempest/v1/api
  53. [hacking]
  54. import_exceptions = neutron.i18n
  55. local-check-factory = neutron.hacking.checks.factory
  56. # TODO(armax): due to bug #1515335, set TEMPEST_CONFIG_DIR in your
  57. # local env, like this:
  58. #
  59. # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
  60. #
  61. [testenv:apiv1]
  62. sitepackages = True
  63. setenv =
  64. OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v1/api
  65. OS_TESTR_CONCURRENCY=1
  66. # TODO(armax): due to bug #1515335, set TEMPEST_CONFIG_DIR in your
  67. # local env, like this:
  68. #
  69. # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
  70. #
  71. [testenv:apiv2]
  72. sitepackages = True
  73. setenv =
  74. OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/api
  75. OS_TESTR_CONCURRENCY=1
  76. # TODO(armax): due to bug #1515335, set TEMPEST_CONFIG_DIR in your
  77. # local env, like this:
  78. #
  79. # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
  80. #
  81. [testenv:scenario]
  82. sitepackages = True
  83. setenv =
  84. OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/scenario
  85. OS_TESTR_CONCURRENCY=1
  86. # TODO(armax): due to bug #1515335, set TEMPEST_CONFIG_DIR in your
  87. # local env, like this:
  88. #
  89. # TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
  90. #
  91. [testenv:ddt]
  92. sitepackages = True
  93. setenv =
  94. OS_TEST_PATH={toxinidir}/neutron_lbaas/tests/tempest/v2/ddt
  95. OS_TESTR_CONCURRENCY=1