Juju Charm - Keystone LDAP backend
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.

93 lines
2.3 KiB

  1. # Source charm: ./tox.ini
  2. # This file is managed centrally by release-tools and should not be modified
  3. # within individual charm repos. See the 'global' dir contents for available
  4. # choices of tox.ini for OpenStack Charms:
  5. # https://github.com/openstack-charmers/release-tools
  6. [tox]
  7. skipsdist = True
  8. envlist = pep8,py3
  9. # NOTE: Avoid build/test env pollution by not enabling sitepackages.
  10. sitepackages = False
  11. # NOTE: Avoid false positives by not skipping missing interpreters.
  12. skip_missing_interpreters = False
  13. [testenv]
  14. setenv = VIRTUAL_ENV={envdir}
  15. PYTHONHASHSEED=0
  16. TERM=linux
  17. LAYER_PATH={toxinidir}/layers
  18. INTERFACE_PATH={toxinidir}/interfaces
  19. JUJU_REPOSITORY={toxinidir}/build
  20. passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY
  21. install_command =
  22. pip install {opts} {packages}
  23. deps =
  24. -r{toxinidir}/requirements.txt
  25. [testenv:build]
  26. basepython = python3
  27. commands =
  28. charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
  29. [testenv:py3]
  30. basepython = python3
  31. deps = -r{toxinidir}/test-requirements.txt
  32. commands = stestr run --slowest {posargs}
  33. [testenv:py35]
  34. basepython = python3.5
  35. deps = -r{toxinidir}/test-requirements.txt
  36. commands = stestr run --slowest {posargs}
  37. [testenv:py36]
  38. basepython = python3.6
  39. deps = -r{toxinidir}/test-requirements.txt
  40. commands = stestr run --slowest {posargs}
  41. [testenv:py37]
  42. basepython = python3.7
  43. deps = -r{toxinidir}/test-requirements.txt
  44. commands = stestr run --slowest {posargs}
  45. [testenv:pep8]
  46. basepython = python3
  47. deps = -r{toxinidir}/test-requirements.txt
  48. commands = flake8 {posargs} src unit_tests
  49. [testenv:cover]
  50. # Technique based heavily upon
  51. # https://github.com/openstack/nova/blob/master/tox.ini
  52. basepython = python3
  53. deps = -r{toxinidir}/requirements.txt
  54. -r{toxinidir}/test-requirements.txt
  55. setenv =
  56. {[testenv]setenv}
  57. PYTHON=coverage run
  58. commands =
  59. coverage erase
  60. stestr run --slowest {posargs}
  61. coverage combine
  62. coverage html -d cover
  63. coverage xml -o cover/coverage.xml
  64. coverage report
  65. [coverage:run]
  66. branch = True
  67. concurrency = multiprocessing
  68. parallel = True
  69. source =
  70. .
  71. omit =
  72. .tox/*
  73. */charmhelpers/*
  74. unit_tests/*
  75. [testenv:venv]
  76. basepython = python3
  77. commands = {posargs}
  78. [flake8]
  79. # E402 ignore necessary for path append before sys module import in actions
  80. ignore = E402,W504