A Python agent for provisioning and deprovisioning Bare Metal servers.
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.
 
 
 

100 lines
3.0 KiB

  1. [tox]
  2. minversion = 1.6
  3. skipsdist = True
  4. envlist = py3,py27,functional,pep8
  5. [testenv]
  6. usedevelop = True
  7. install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/queens/upper-constraints.txt} {opts} {packages}
  8. setenv =
  9. VIRTUAL_ENV={envdir}
  10. PYTHONDONTWRITEBYTECODE = 1
  11. OS_TEST_PATH=./ironic_python_agent/tests/unit
  12. LANGUAGE=en_US
  13. LC_ALL=en_US.utf-8
  14. deps = -r{toxinidir}/test-requirements.txt
  15. commands = ostestr {posargs}
  16. [testenv:functional]
  17. usedevelop = True
  18. # Define virtualenv directory, port to use for functional testing, and number
  19. # of seconds to wait for the agent to come alive during functional testing.
  20. setenv =
  21. VIRTUAL_ENV={envdir}
  22. PYTHONDONTWRITEBYTECODE = 1
  23. OS_TEST_PATH=./ironic_python_agent/tests/functional
  24. TEST_PORT=9999
  25. IPA_WAIT_TRIES=100
  26. commands = ostestr {posargs}
  27. [testenv:pep8]
  28. whitelist_externals = bash
  29. commands =
  30. flake8 {posargs:ironic_python_agent imagebuild}
  31. # Run bashate during pep8 runs to ensure violations are caught by
  32. # the check and gate queues.
  33. {toxinidir}/tools/run_bashate.sh {toxinidir}
  34. doc8 doc/source README.rst
  35. [testenv:cover]
  36. setenv = VIRTUAL_ENV={envdir}
  37. PYTHON=coverage run --source ironic_python_agent --omit='*tests*' --parallel-mode
  38. commands =
  39. coverage erase
  40. ostestr {posargs}
  41. coverage combine
  42. coverage report --omit='*tests*'
  43. coverage html -d ./cover --omit='*tests*'
  44. [testenv:venv]
  45. setenv = PYTHONHASHSEED=0
  46. commands = {posargs:}
  47. [testenv:debug]
  48. envdir = {toxworkdir}/venv
  49. commands = oslo_debug_helper -t ironic_python_agent/tests/unit {posargs}
  50. [testenv:devenv]
  51. envdir = devenv
  52. usedevelop = True
  53. [testenv:docs]
  54. setenv = PYTHONHASHSEED=0
  55. sitepackages = False
  56. commands =
  57. python setup.py build_sphinx
  58. [testenv:releasenotes]
  59. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  60. [flake8]
  61. # [E129] visually indented line with same indent as next logical line.
  62. # [W503] Line break before binary operator.
  63. ignore = E129,W503
  64. exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,imagebuild/tinyipa/tinyipafinal,imagebuild/tinyipa/tinyipabuild
  65. import-order-style = pep8
  66. application-import-names = ironic_python_agent
  67. # [H106] Don't put vim configuration in source files.
  68. # [H203] Use assertIs(Not)None to check for None.
  69. # [H204] Use assert(Not)Equal to check for equality.
  70. # [H205] Use assert(Greater|Less)(Equal) for comparison.
  71. # [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
  72. # [H904] Delay string interpolations at logging calls.
  73. enable-extensions=H106,H203,H204,H205,H210,H904
  74. [hacking]
  75. import_exceptions = ironic.openstack.common.gettextutils._,testtools.matchers
  76. [testenv:checkconfig]
  77. sitepackages = False
  78. envdir = {toxworkdir}/venv
  79. commands =
  80. {toxinidir}/tools/config/check_uptodate.sh
  81. [testenv:genconfig]
  82. sitepackages = False
  83. envdir = {toxworkdir}/venv
  84. commands =
  85. oslo-config-generator --config-file=tools/config/ipa-config-generator.conf