OpenStack Messaging (Zaqar)
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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. [tox]
  2. minversion = 2.0
  3. envlist = py35,py27,pep8
  4. skipsdist = True
  5. [testenv]
  6. usedevelop = True
  7. install_command = pip install {opts} {packages}
  8. setenv = VIRTUAL_ENV={envdir}
  9. ZAQAR_TESTS_CONFIGS_DIR={toxinidir}/zaqar/tests/etc/
  10. ZAQAR_TEST_MONGODB=1
  11. ZAQAR_TEST_SLOW=1
  12. OS_STDOUT_CAPTURE=1
  13. OS_STDERR_CAPTURE=1
  14. OS_TEST_TIMEOUT=60
  15. OS_TEST_PATH=./zaqar/tests/unit
  16. deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  17. -r{toxinidir}/requirements.txt
  18. -r{toxinidir}/test-requirements.txt
  19. commands =
  20. find . -type f -name "*.pyc" -delete
  21. ostestr --concurrency 1 {posargs}
  22. whitelist_externals = find
  23. [testenv:integration]
  24. basepython = python3
  25. setenv = {[testenv]setenv}
  26. ZAQAR_TEST_INTEGRATION=1
  27. OS_TEST_PATH=./zaqar/tests/functional
  28. commands = ostestr --concurrency 1 {posargs}
  29. [testenv:pep8]
  30. basepython = python3
  31. commands =
  32. doc8 doc/source
  33. flake8
  34. [testenv:genconfig]
  35. basepython = python3
  36. commands =
  37. oslo-config-generator --config-file etc/oslo-config-generator/zaqar.conf
  38. [testenv:genpolicy]
  39. basepython = python3
  40. commands =
  41. oslopolicy-sample-generator --config-file etc/zaqar-policy-generator.conf
  42. [testenv:cover]
  43. basepython = python3
  44. setenv =
  45. {[testenv]setenv}
  46. PYTHON=coverage run --source zaqar --parallel-mode
  47. commands =
  48. stestr run {posargs}
  49. coverage combine
  50. coverage html -d cover
  51. coverage xml -o cover/coverage.xml
  52. [testenv:venv]
  53. basepython = python3
  54. commands = {posargs}
  55. [testenv:docs]
  56. basepython = python3
  57. deps =
  58. -r{toxinidir}/doc/requirements.txt
  59. commands =
  60. sphinx-build -W -b html doc/source doc/build/html
  61. [testenv:api-ref]
  62. basepython = python3
  63. # This environment is called from CI scripts to test and publish
  64. # the API Ref to developer.openstack.org.
  65. #
  66. whitelist_externals = bash
  67. rm
  68. commands =
  69. rm -rf api-ref/build
  70. sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
  71. [testenv:debug]
  72. basepython = python3
  73. commands = oslo_debug_helper {posargs}
  74. [testenv:releasenotes]
  75. basepython = python3
  76. commands =
  77. doc8 releasenotes/source releasenotes/notes
  78. sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  79. [flake8]
  80. exclude = .venv*,.git,.tox,dist,doc,*lib/python*,*.egg,.update-venv
  81. # NOTE(flaper87): Our currently max-complexity is 20. Not sure what the ideal complexity
  82. # for Zaqar should be but lets keep it to the minimum possible.
  83. max-complexity = 20
  84. # [H904] Delay string interpolations at logging calls.
  85. enable-extensions=H904
  86. [doc8]
  87. # File extensions to check
  88. extensions = .rst, .yaml
  89. # Maximal line length should be 80 but we have some overlong lines.
  90. # Let's not get far more in.
  91. max-line-length = 80
  92. [hacking]
  93. local-check-factory = zaqar.hacking.checks.factory
  94. [testenv:lower-constraints]
  95. basepython = python3
  96. deps =
  97. -c{toxinidir}/lower-constraints.txt
  98. -r{toxinidir}/test-requirements.txt
  99. -r{toxinidir}/requirements.txt