OpenStack Baremetal Compute Service
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 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. [tox]
  2. minversion = 2.0
  3. envlist = py35-constraints,py27-constraints,pypy-constraints,pep8-constraints,functional
  4. skipsdist = True
  5. [testenv]
  6. usedevelop = True
  7. install_command = {[testenv:common-constraints]install_command}
  8. setenv =
  9. VIRTUAL_ENV={envdir}
  10. OS_TEST_PATH=mogan/tests/unit
  11. deps = -r{toxinidir}/test-requirements.txt
  12. commands = rm -f .testrepository/times.dbm
  13. python setup.py test --slowest --testr-args='{posargs}'
  14. [testenv:common-constraints]
  15. install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
  16. [testenv:pep8]
  17. commands = flake8 {posargs}
  18. [testenv:pep8-constraints]
  19. install_command = {[testenv:common-constraints]install_command}
  20. commands = flake8 {posargs}
  21. [testenv:venv]
  22. commands = {posargs}
  23. [testenv:venv-constraints]
  24. install_command = {[testenv:common-constraints]install_command}
  25. commands = {posargs}
  26. [testenv:cover]
  27. commands =
  28. python setup.py test --coverage --testr-args='{posargs}'
  29. coverage report
  30. [testenv:cover-constraints]
  31. install_command = {[testenv:common-constraints]install_command}
  32. commands = python setup.py test --coverage --testr-args='{posargs}'
  33. [testenv:docs]
  34. commands =
  35. python setup.py build_sphinx
  36. oslo-config-generator --config-file=tools/config/mogan-config-generator.conf
  37. [testenv:releasenotes]
  38. commands =
  39. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  40. [testenv:docs-constraints]
  41. install_command = {[testenv:common-constraints]install_command}
  42. commands = python setup.py build_sphinx
  43. [testenv:debug]
  44. commands = oslo_debug_helper {posargs}
  45. [testenv:functional]
  46. setenv = OS_TEST_PATH=mogan/tests/functional/
  47. commands = python setup.py testr --slowest --testr-args="{posargs}"
  48. [testenv:debug-constraints]
  49. install_command = {[testenv:common-constraints]install_command}
  50. commands = oslo_debug_helper {posargs}
  51. [testenv:genconfig]
  52. sitepackages = False
  53. envdir = {toxworkdir}/venv
  54. commands =
  55. oslo-config-generator --config-file=tools/config/mogan-config-generator.conf
  56. [testenv:genpolicy]
  57. sitepackages = False
  58. envdir = {toxworkdir}/venv
  59. commands =
  60. oslopolicy-sample-generator --config-file=tools/config/mogan-policy-generator.conf
  61. [testenv:api-ref]
  62. # This environment is called from CI scripts to test and publish
  63. # the API Ref to developer.openstack.org.
  64. whitelist_externals = bash
  65. commands =
  66. bash -c 'rm -rf api-ref/build'
  67. sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
  68. [flake8]
  69. # H405 is another one that is good as a guideline, but sometimes
  70. # multiline doc strings just don't have a natural summary
  71. # line. Rejecting code for this reason is wrong.
  72. show-source = True
  73. ignore = H405
  74. builtins = _
  75. exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
  76. [hacking]
  77. import_exceptions = mogan.common.i18n
  78. [testenv:lower-constraints]
  79. basepython = python3
  80. deps =
  81. -c{toxinidir}/lower-constraints.txt
  82. -r{toxinidir}/test-requirements.txt
  83. -r{toxinidir}/requirements.txt