Fuel UI
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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. [tox]
  2. minversion = 1.6
  3. skipsdist = True
  4. setupdir = {toxinidir}/nailgun
  5. envlist = py27,py34,pep8
  6. [base]
  7. ARTS = {env:ARTS:test_run}
  8. TOOLS = {toxinidir}/nailgun/tools
  9. [common]
  10. changedir={toxinidir}/nailgun
  11. setenv =
  12. DB_ROOT={env:DB_ROOT:postgres}
  13. DB_ROOTPW={env:DB_ROOTPW:insecure_slave}
  14. DB_ROOTPGPASS={[base]ARTS}/pgpass
  15. NAILGUN_DB_PREPARE={env:NAILGUN_DB_PREPARE:yes}
  16. NAILGUN_DB={env:NAILGUN_DB:openstack_citest}
  17. NAILGUN_DB_HOST={env:NAILGUN_DB_HOST:127.0.0.1}
  18. NAILGUN_DB_PORT={env:NAILGUN_DB_PORT:5432}
  19. NAILGUN_DB_USER={env:NAILGUN_DB_USER:openstack_citest}
  20. NAILGUN_DB_USERPW={env:NAILGUN_DB_USERPW:openstack_citest}
  21. NAILGUN_ROOT={toxinidir}/nailgun
  22. NAILGUN_STATIC={env:NAILGUN_STATIC:static}
  23. NAILGUN_TEMPLATES={env:NAILGUN_TEMPLATES:static}
  24. NAILGUN_FIXTURE_FILES={env:NAILGUN_FIXTURE_FILES:}
  25. NAILGUN_CONFIG={[base]ARTS}/test.yaml
  26. NAILGUN_LOGS={[base]ARTS}
  27. NAILGUN_PORT={env:NAILGUN_PORT:8000}
  28. NAILGUN_START_MAX_WAIT_TIME=20
  29. NAILGUN_CHECK_URL=/api/version
  30. [testenv]
  31. usedevelop = True
  32. install_command = pip install --allow-external -U {opts} {packages}
  33. whitelist_externals = bash
  34. python
  35. changedir={toxinidir}/nailgun
  36. setenv = VIRTUAL_ENV={envdir}
  37. {[common]setenv}
  38. passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
  39. deps = -r{toxinidir}/nailgun/test-requirements.txt
  40. commands =
  41. bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
  42. py.test -vv --cleandb --junit-xml {toxinidir}/nailgun/nailgun.xml -m 'not performance' -n 4 {posargs:nailgun/test}
  43. py.test -vv --junit-xml {toxinidir}/nailgun/extensions.xml -n 4 {posargs:nailgun/extensions}
  44. [testenv:performance]
  45. commands =
  46. bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
  47. py.test -vv --cleandb --junit-xml {toxinidir}/nailgun/nailgun.xml -m 'performance' -n 4 {posargs:nailgun/test}
  48. [testenv:cleanup]
  49. usedevelop = False
  50. setenv = VIRTUAL_ENV={envdir}
  51. {[common]setenv}
  52. deps =
  53. commands =
  54. bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_database"
  55. bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_env"
  56. [testenv:start]
  57. setenv = VIRTUAL_ENV={envdir}
  58. {[common]setenv}
  59. deps = -r{toxinidir}/nailgun/requirements.txt
  60. commands =
  61. bash -c "{[base]TOOLS}/env.sh prepare_nailgun_env"
  62. bash -c "{[base]TOOLS}/env.sh prepare_nailgun_database"
  63. bash -c "{[base]TOOLS}/env.sh prepare_nailgun_server"
  64. [testenv:stop]
  65. usedevelop = False
  66. setenv = VIRTUAL_ENV={envdir}
  67. {[common]setenv}
  68. deps =
  69. commands =
  70. bash -c "{[base]TOOLS}/env.sh cleanup_nailgun_server"
  71. [testenv:cover]
  72. setenv = NOSE_WITH_COVERAGE=1
  73. [testenv:venv]
  74. deps = -r{toxinidir}/nailgun/test-requirements.txt
  75. commands = {posargs:}
  76. [testenv:pep8]
  77. deps = hacking==0.10
  78. usedevelop = False
  79. commands =
  80. flake8 {posargs:nailgun}
  81. [flake8]
  82. # NOTE(eli): H304 is "No relative imports" error, relative
  83. # imports are required for extensions which can be moved
  84. # from nailgun directory to different place
  85. ignore = H234,H302,H802,H304
  86. exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,__init__.py,docs
  87. show-pep8 = True
  88. show-source = True
  89. count = True
  90. [hacking]
  91. import_exceptions = testtools.matchers