Dynamic routing 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.

tox.ini 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. [tox]
  2. envlist = py36,py27,pep8,pylint
  3. minversion = 2.5.0
  4. skipsdist = True
  5. [testenv]
  6. setenv = VIRTUAL_ENV={envdir}
  7. OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
  8. OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
  9. OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
  10. PYTHONWARNINGS=default::DeprecationWarning
  11. usedevelop = True
  12. install_command =pip install {opts} {packages}
  13. deps = -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
  14. -r{toxinidir}/requirements.txt
  15. -r{toxinidir}/test-requirements.txt
  16. whitelist_externals =
  17. find
  18. sh
  19. commands =
  20. find . -type f -name "*.py[c|o]" -delete
  21. find . -type l -name "*.py[c|o]" -delete
  22. find . -depth -path "*/__pycache__*" -delete
  23. stestr run {posargs}
  24. # there is also secret magic in stestr which lets you run in a fail only
  25. # mode. To do this define the TRACE_FAILONLY environmental variable.
  26. [testenv:functional]
  27. basepython = python3
  28. setenv = OS_TEST_PATH=./neutron_dynamic_routing/tests/functional
  29. commands =
  30. stestr run {posargs}
  31. stestr slowest
  32. [testenv:api]
  33. basepython = python3
  34. sitepackages=True
  35. setenv =
  36. OS_TEST_PATH=./neutron_dynamic_routing/tests/tempest/api/
  37. OS_TESTR_CONCURRENCY=1
  38. TEMPEST_CONFIG_DIR={env:TEMPEST_CONFIG_DIR:/opt/stack/tempest/etc}
  39. commands =
  40. stestr run {posargs}
  41. stestr slowest
  42. [testenv:dsvm-functional]
  43. basepython = python3
  44. setenv =
  45. OS_TEST_PATH=./neutron_dynamic_routing/tests/functional
  46. OS_SUDO_TESTING=1
  47. OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
  48. OS_ROOTWRAP_DAEMON_CMD=sudo {envdir}/bin/neutron-rootwrap-daemon {envdir}/etc/neutron/rootwrap.conf
  49. OS_FAIL_ON_MISSING_DEPS=1
  50. whitelist_externals =
  51. sh
  52. cp
  53. sudo
  54. commands =
  55. stestr run {posargs}
  56. [testenv:releasenotes]
  57. basepython = python3
  58. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  59. [testenv:pep8]
  60. basepython = python3
  61. commands =
  62. flake8
  63. neutron-db-manage --subproject neutron-dynamic-routing --database-connection sqlite:// check_migration
  64. {[testenv:genconfig]commands}
  65. {[testenv:genpolicy]commands}
  66. [testenv:cover]
  67. basepython = python3
  68. setenv =
  69. {[testenv]setenv}
  70. PYTHON=coverage run --source neutron_dynamic_routing --parallel-mode
  71. commands =
  72. stestr run --no-subunit-trace {posargs}
  73. coverage combine
  74. coverage html -d cover
  75. coverage xml -o cover/coverage.xml
  76. [testenv:venv]
  77. basepython = python3
  78. commands = {posargs}
  79. [testenv:docs]
  80. basepython = python3
  81. commands = python setup.py build_sphinx
  82. [flake8]
  83. # E125 continuation line does not distinguish itself from next logical line
  84. # E126 continuation line over-indented for hanging indent
  85. # E128 continuation line under-indented for visual indent
  86. # E129 visually indented line with same indent as next logical line
  87. # E265 block comment should start with ‘# ‘
  88. # H405 multi line docstring summary not separated with an empty line
  89. # TODO(marun) H404 multi line docstring should start with a summary
  90. # N530 direct neutron imports not allowed
  91. # TODO(ihrachys) -- reenable N537 when new neutron-lib release is available
  92. # N537 Log messages should not be translated
  93. # H106 Don’t put vim configuration in source files
  94. # H203 Use assertIs(Not)None to check for None
  95. # W504 line break after binary operator
  96. # (W503 and W504 are incompatible and we need to choose one of them.
  97. # Existing codes follows W503, so we disable W504.)
  98. ignore = E125,E126,E128,E129,E265,H404,H405,N530,N537,W504
  99. enable-extensions=H106,H203
  100. show-source = true
  101. exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios
  102. import-order-style = pep8
  103. [testenv:pylint]
  104. deps =
  105. {[testenv]deps}
  106. pylint
  107. commands =
  108. pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron_dynamic_routing}
  109. [hacking]
  110. import_exceptions = neutron_dynamic_routing._i18n
  111. local-check-factory = neutron_lib.hacking.checks.factory
  112. [testenv:genconfig]
  113. commands = {toxinidir}/tools/generate_config_file_samples.sh
  114. [testenv:genpolicy]
  115. commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
  116. [testenv:lower-constraints]
  117. basepython = python3
  118. deps =
  119. -c{toxinidir}/lower-constraints.txt
  120. -r{toxinidir}/test-requirements.txt
  121. -r{toxinidir}/requirements.txt
  122. [testenv:dev]
  123. # run locally (not in the gate) using editable mode
  124. # https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
  125. commands =
  126. pip install -q -e "git+https://opendev.org/openstack/neutron#egg=neutron"
  127. [testenv:py3-dev]
  128. basepython = python3
  129. commands =
  130. {[testenv:dev]commands}
  131. {[testenv]commands}
  132. [testenv:pep8-dev]
  133. basepython = python3
  134. deps =
  135. {[testenv]deps}
  136. commands =
  137. {[testenv:dev]commands}
  138. {[testenv:pep8]commands}