Glance stores library
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 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. [tox]
  2. minversion = 1.6
  3. envlist = py35,py27,pep8
  4. skipsdist = True
  5. [testenv]
  6. setenv = VIRTUAL_ENV={envdir}
  7. usedevelop = True
  8. deps =
  9. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  10. -r{toxinidir}/requirements.txt
  11. -r{toxinidir}/test-requirements.txt
  12. passenv = OS_TEST_*
  13. commands = stestr run --slowest {posargs}
  14. [testenv:docs]
  15. basepython = python3
  16. deps = -r{toxinidir}/doc/requirements.txt
  17. commands = sphinx-build -W -b html doc/source doc/build/html
  18. [testenv:releasenotes]
  19. basepython = python3
  20. deps = -r{toxinidir}/doc/requirements.txt
  21. commands = sphinx-build -a -E -W -d releasenotes/build/.doctrees -b html releasenotes/source releasenotes/build/html
  22. [testenv:pep8]
  23. basepython = python3
  24. commands =
  25. flake8 {posargs}
  26. # Run security linter
  27. # The following bandit tests are being skipped:
  28. # B101 - Use of assert detected.
  29. # B110 - Try, Except, Pass detected.
  30. # B303 - Use of insecure MD2, MD4, or MD5 hash function.
  31. bandit -r glance_store -x tests --skip B101,B110,B303
  32. doc8 {posargs}
  33. [testenv:bandit]
  34. basepython = python3
  35. # NOTE(browne): This is required for the integration test job of the bandit
  36. # project. Please do not remove.
  37. # The following bandit tests are being skipped:
  38. # B101 - Use of assert detected.
  39. # B110 - Try, Except, Pass detected.
  40. # B303 - Use of insecure MD2, MD4, or MD5 hash function.
  41. commands = bandit -r glance_store -x tests --skip B101,B110,B303
  42. [testenv:cover]
  43. basepython = python3
  44. setenv =
  45. PYTHON=coverage run --source glance_store --parallel-mode
  46. commands =
  47. stestr run {posargs}
  48. coverage combine
  49. coverage html -d cover
  50. coverage xml -o cover/coverage.xml
  51. [testenv:venv]
  52. basepython = python3
  53. commands = {posargs}
  54. # See glance_store/tests/functional/README.rst for information on writing or
  55. # running functional tests.
  56. [testenv:functional-swift]
  57. sitepackages = True
  58. commands =
  59. stestr run --slowest --test-path=./glance_store/tests/functional/swift
  60. [testenv:functional-filesystem]
  61. commands =
  62. stestr run --slowest --test-path=./glance_store/tests/functional/filesystem
  63. [doc8]
  64. ignore-path = .venv,.git,.tox,*glance_store/locale*,*lib/python*,glance_store.egg*,doc/build,*requirements.txt,lower-constraints.txt
  65. [flake8]
  66. # TODO(dmllr): Analyze or fix the warnings blacklisted below
  67. # H301 one import per line
  68. # H404 multi line docstring should start with a summary
  69. # H405 multi line docstring summary not separated with an empty line
  70. ignore = H301,H404,H405
  71. exclude = .venv,.git,.tox,dist,doc,etc,*glance_store/locale*,*lib/python*,*egg,build
  72. [testenv:lower-constraints]
  73. basepython = python3
  74. deps =
  75. -c{toxinidir}/lower-constraints.txt
  76. -r{toxinidir}/test-requirements.txt
  77. .[vmware,swift,cinder]