tox.ini 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [tox]
  2. minversion = 4.0.2
  3. envlist = py3,pep8,cover
  4. skipsdist = True
  5. [testenv]
  6. usedevelop = True
  7. setenv = VIRTUAL_ENV={envdir}
  8. deps =
  9. -r{toxinidir}/test-requirements.txt
  10. -r{toxinidir}/requirements.txt
  11. git+https://github.com/cloudbase/python-coriolisclient.git
  12. commands = stestr run --slowest --exclude-regex coriolis.tests.integration {posargs}
  13. [testenv:pep8]
  14. commands = flake8 {posargs}
  15. [testenv:cover]
  16. setenv =
  17. {[testenv]setenv}
  18. PYTHON=coverage run --source coriolis --parallel-mode
  19. commands =
  20. stestr run --no-subunit-trace --exclude-regex coriolis.tests.integration {posargs}
  21. coverage combine
  22. coverage report --fail-under=82 --skip-covered
  23. coverage html -d cover
  24. coverage xml -o cover/coverage.xml
  25. [testenv:integration]
  26. # Must be run as root: sudo -E tox -e integration
  27. # Requires the scsi_debug kernel module: modinfo scsi_debug
  28. # Requires kernel version 5.11 or newer (scsi_debug: per_host_store=1 parameter)
  29. #
  30. # To test with an external provider, set CORIOLIS_PROVIDER_PACKAGE to a local
  31. # path or pip-compatible specifier (git+file://, git+https://, etc.) and run:
  32. # sudo -E CORIOLIS_PROVIDER_PACKAGE=/path/to/provider tox -e integration
  33. setenv =
  34. {[testenv]setenv}
  35. PBR_VERSION = 0.0.1
  36. passenv =
  37. CORIOLIS_*
  38. deps =
  39. {[testenv]deps}
  40. git+https://github.com/cloudbase/python-coriolisclient.git
  41. {env:CORIOLIS_PROVIDER_PACKAGE:}
  42. commands = stestr run --slowest --concurrency=1 --test-path coriolis/tests/integration/ {posargs}
  43. [testenv:venv]
  44. commands = {posargs}
  45. [coverage:run]
  46. source = coriolis
  47. omit = coriolis/tests/*
  48. [flake8]
  49. # E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
  50. # E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
  51. ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632,H401,H403,H404,H405,H202
  52. exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools