Container Infrastructure Management Service for OpenStack
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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. [tox]
  2. minversion = 1.6
  3. envlist = py35,py27,pep8
  4. skipsdist = True
  5. [testenv]
  6. usedevelop = True
  7. install_command =
  8. pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata} -U {opts} {packages}
  9. whitelist_externals = bash
  10. find
  11. rm
  12. setenv =
  13. VIRTUAL_ENV={envdir}
  14. PYTHONWARNINGS=default::DeprecationWarning
  15. deps = -r{toxinidir}/requirements.txt
  16. -r{toxinidir}/test-requirements.txt
  17. passenv = TEMPEST_* OS_TEST_*
  18. commands =
  19. find . -type f -name "*.py[c|o]" -delete
  20. bash tools/pretty_tox.sh '{posargs}'
  21. [testenv:debug]
  22. commands = oslo_debug_helper {posargs}
  23. [testenv:debug-py27]
  24. basepython = python2.7
  25. commands = oslo_debug_helper {posargs}
  26. [testenv:debug-py35]
  27. basepython = python3.5
  28. commands = oslo_debug_helper {posargs}
  29. [testenv:functional-api]
  30. sitepackages = True
  31. setenv = {[testenv]setenv}
  32. OS_TEST_PATH=./magnum/tests/functional/api
  33. OS_TEST_TIMEOUT=7200
  34. deps =
  35. {[testenv]deps}
  36. commands =
  37. find . -type f -name "*.py[c|o]" -delete
  38. bash tools/pretty_tox.sh '{posargs}'
  39. [testenv:functional-k8s]
  40. sitepackages = True
  41. setenv = {[testenv]setenv}
  42. OS_TEST_PATH=./magnum/tests/functional/k8s
  43. OS_TEST_TIMEOUT=7200
  44. deps =
  45. {[testenv]deps}
  46. commands =
  47. find . -type f -name "*.py[c|o]" -delete
  48. bash tools/pretty_tox.sh '{posargs}'
  49. [testenv:functional-k8s-ironic]
  50. sitepackages = True
  51. setenv = {[testenv]setenv}
  52. OS_TEST_PATH=./magnum/tests/functional/k8s_ironic
  53. OS_TEST_TIMEOUT=7200
  54. deps =
  55. {[testenv]deps}
  56. commands =
  57. find . -type f -name "*.py[c|o]" -delete
  58. bash tools/pretty_tox.sh '{posargs}'
  59. [testenv:functional-k8s-coreos]
  60. sitepackages = True
  61. setenv = {[testenv]setenv}
  62. OS_TEST_PATH=./magnum/tests/functional/k8s_coreos
  63. OS_TEST_TIMEOUT=7200
  64. deps =
  65. {[testenv]deps}
  66. commands =
  67. find . -type f -name "*.py[c|o]" -delete
  68. bash tools/pretty_tox.sh '{posargs}'
  69. [testenv:functional-swarm]
  70. sitepackages = True
  71. setenv = {[testenv]setenv}
  72. OS_TEST_PATH=./magnum/tests/functional/swarm
  73. OS_TEST_TIMEOUT=7200
  74. deps =
  75. {[testenv]deps}
  76. commands =
  77. find . -type f -name "*.py[c|o]" -delete
  78. bash tools/pretty_tox.sh '{posargs}'
  79. [testenv:functional-mesos]
  80. sitepackages = True
  81. setenv = {[testenv]setenv}
  82. OS_TEST_PATH=./magnum/tests/functional/mesos
  83. OS_TEST_TIMEOUT=7200
  84. deps =
  85. {[testenv]deps}
  86. commands =
  87. find . -type f -name "*.py[c|o]" -delete
  88. bash tools/pretty_tox.sh '{posargs}'
  89. [testenv:pep8]
  90. commands =
  91. doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
  92. bash tools/flake8wrap.sh {posargs}
  93. bandit -r magnum -x tests -n5 -ll
  94. bash -c "find {toxinidir} \
  95. -not \( -type d -name .?\* -prune \) \
  96. -not \( -type d -name doc -prune \) \
  97. -not \( -type d -name contrib -prune \) \
  98. -type f \
  99. -name \*.sh \
  100. -print0 | xargs -0 bashate -v -iE006,E010,E042 -eE005"
  101. [testenv:venv]
  102. commands = {posargs}
  103. [testenv:bandit]
  104. deps = -r{toxinidir}/test-requirements.txt
  105. commands = bandit -r magnum -x tests -n5 -ll
  106. [testenv:cover]
  107. commands = {toxinidir}/cover.sh {posargs}
  108. [testenv:docs]
  109. commands =
  110. doc8 -e .rst specs/ doc/source/ contrib/ CONTRIBUTING.rst HACKING.rst README.rst
  111. python setup.py build_sphinx
  112. [testenv:genconfig]
  113. commands =
  114. oslo-config-generator --config-file etc/magnum/magnum-config-generator.conf
  115. [flake8]
  116. exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,tools,releasenotes
  117. [hacking]
  118. local-check-factory = magnum.hacking.checks.factory
  119. [testenv:pip-missing-reqs]
  120. # do not install test-requirements as that will pollute the virtualenv for
  121. # determining missing packages
  122. # this also means that pip-missing-reqs must be installed separately, outside
  123. # of the requirements.txt files
  124. deps = pip_missing_reqs
  125. -rrequirements.txt
  126. commands=pip-missing-reqs -d --ignore-file=magnum/tests/* magnum
  127. [testenv:releasenotes]
  128. commands =
  129. rm -rf releasenotes/build
  130. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  131. [testenv:install-guide]
  132. commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
  133. # we do not used -W here because we are doing some slightly tricky
  134. # things to build a single page document, and as such, we are ok
  135. # ignoring the duplicate stanzas warning.
  136. [testenv:api-ref]
  137. commands =
  138. rm -rf api-ref/build
  139. sphinx-build -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html