OpenStack Database As A Service (Trove)
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.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. [tox]
  2. envlist = py{27,34,35},pep8,apiexamples,cover,api-ref,releasenotes,bandit,fakemodetests,pylint
  3. minversion = 1.6
  4. skipsdist = True
  5. [testenv]
  6. setenv = VIRTUAL_ENV={envdir}
  7. PYTHONWARNINGS=default::DeprecationWarning
  8. OS_TEST_PATH=./trove/tests/unittests
  9. OS_STDOUT_CAPTURE=1
  10. OS_STDERR_CAPTURE=1
  11. usedevelop = True
  12. install_command = pip install \
  13. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} \
  14. -U {opts} {packages}
  15. deps = -r{toxinidir}/requirements.txt
  16. -r{toxinidir}/test-requirements.txt
  17. commands = find ./trove -type f -name "*.pyc" -delete
  18. rm -f .testrepository/times.dbm
  19. rm -f trove_test.sqlite
  20. whitelist_externals = find
  21. rm
  22. bash
  23. [tox:jenkins]
  24. sitepackages = True
  25. [testenv:pep8]
  26. basepython = python2.7
  27. commands =
  28. flake8
  29. [testenv:py27]
  30. commands = {[testenv]commands}
  31. ostestr {posargs} --slowest --serial
  32. [py3base]
  33. commands = ostestr --slowest --blacklist-file=blacklist-py3.txt --serial --regex '.*'
  34. [testenv:py34]
  35. commands = {[testenv]commands}
  36. {[py3base]commands}
  37. [testenv:py35]
  38. commands = {[testenv]commands}
  39. {[py3base]commands}
  40. [testenv:apiexamples]
  41. commands = {envpython} generate_examples.py
  42. [testenv:fakemodetests]
  43. commands = {envpython} run_tests.py
  44. [testenv:debug]
  45. commands = oslo_debug_helper {posargs}
  46. [testenv:cover]
  47. basepython = python2.7
  48. commands =
  49. {[testenv]commands}
  50. coverage erase
  51. python setup.py testr --coverage --testr-args="--concurrency=1"
  52. coverage run -a run_tests.py
  53. coverage html
  54. coverage xml
  55. coverage report
  56. [testenv:venv]
  57. commands = {posargs}
  58. [flake8]
  59. show-source = True
  60. # H301 is ignored on purpose.
  61. # The rest of the ignores are TODOs.
  62. ignore = F821,H301,H404,H405,H501,E402,W503,E731
  63. enable-extensions = H203,H106
  64. builtins = _
  65. exclude=.venv,.tox,.git,dist,doc,*egg,tools,etc,build,*.po,*.pot,integration,releasenotes
  66. filename=*.py,trove-*,app.wsgi
  67. [hacking]
  68. import_exceptions = trove.common.i18n
  69. local-check-factory = trove.hacking.checks.factory
  70. [testenv:api-ref]
  71. # This environment is called from CI scripts to test and publish
  72. # the API Ref to developer.openstack.org.
  73. commands =
  74. rm -rf api-ref/build
  75. sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
  76. [testenv:releasenotes]
  77. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  78. [testenv:bandit]
  79. commands = bandit -r trove -n5 -x tests
  80. [testenv:install-guide]
  81. commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
  82. [testenv:pylint]
  83. deps = -r{toxinidir}/requirements.txt
  84. -r{toxinidir}/test-requirements.txt
  85. commands = {[testenv]commands}
  86. python tools/trove-pylint.py {posargs:check}