An OpenStack Compute driver for LXD
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.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [tox]
  2. minversion = 2.0
  3. envlist = py{3,27},pep8
  4. skipsdist = True
  5. [testenv]
  6. usedevelop = True
  7. install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
  8. setenv =
  9. VIRTUAL_ENV={envdir}
  10. EVENTLET_NO_GREENDNS=yes
  11. PYTHONDONTWRITEBYTECODE=1
  12. LANGUAGE=en_US
  13. LC_ALL=en_US.utf-8
  14. deps = -r{toxinidir}/requirements.txt
  15. -r{toxinidir}/test-requirements.txt
  16. -egit+https://github.com/openstack/nova.git#egg=nova
  17. whitelist_externals =
  18. bash
  19. find
  20. rm
  21. env
  22. commands =
  23. find . -type f -name "*.pyc" -delete
  24. rm -Rf .testrepository/times.dbm
  25. passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES
  26. [testenv:py27]
  27. commands =
  28. {[testenv]commands}
  29. /bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py27/src/nova/nova/virt/
  30. stestr run {posargs}
  31. [testenv:py3]
  32. basepython = python3
  33. commands =
  34. {[testenv]commands}
  35. /bin/cp -r {toxinidir}/nova/virt/lxd/ {toxinidir}/.tox/py3/src/nova/nova/virt/
  36. stestr run {posargs}
  37. [testenv:pep8]
  38. basepython = python3
  39. deps = {[testenv]deps}
  40. commands =
  41. flake8 {toxinidir}/nova
  42. flake8 {toxinidir}/nova_lxd_tempest_plugin
  43. [testenv:venv]
  44. basepython = python3
  45. commands = {posargs}
  46. [testenv:cover]
  47. basepython = python3
  48. # Also do not run test_coverage_ext tests while gathering coverage as those
  49. # tests conflict with coverage.
  50. commands =
  51. coverage erase
  52. find . -type f -name "*.pyc" -delete
  53. python setup.py testr --coverage --testr-args='{posargs}'
  54. coverage report
  55. [testenv:docs]
  56. basepython = python3
  57. commands = python setup.py build_sphinx
  58. [flake8]
  59. # H803 skipped on purpose per list discussion.
  60. # E123, E125 skipped as they are invalid PEP-8.
  61. show-source = True
  62. ignore = E123,E125,H803,H904,H405,H404,H305,H306,H307
  63. builtins = _
  64. exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools/colorizer.py
  65. [testenv:lower-constraints]
  66. basepython = python3
  67. deps =
  68. -c{toxinidir}/lower-constraints.txt
  69. -r{toxinidir}/test-requirements.txt
  70. -r{toxinidir}/requirements.txt