OpenStack in a snap!
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.
 
 
 
 

69 lines
2.1 KiB

  1. [tox]
  2. envlist = init_lint, init_unit, multipass
  3. skipsdist = True
  4. [testenv]
  5. basepython=python3
  6. install_command = pip install {opts} {packages}
  7. setenv =
  8. PATH = /snap/bin:{env:PATH}
  9. passenv = HOME TERM
  10. whitelist_externals =
  11. sudo
  12. /snap/bin/snapcraft
  13. [testenv:snap]
  14. # Testing environment for the gerrit gate. Named 'snap' to conform to
  15. # the requirements of the snap friendly job that we inherit from in
  16. # .zuul.yaml.
  17. basepython=python3
  18. deps = -r{toxinidir}/test-requirements.txt
  19. commands =
  20. {toxinidir}/tools/lxd_build.sh
  21. flake8 {toxinidir}/tests/
  22. # Specify tests in sequence, as they can't run in parallel if not
  23. # using multipass.
  24. {toxinidir}/tests/test_basic.py
  25. {toxinidir}/tests/test_control.py
  26. [testenv:multipass]
  27. # Default testing environment for a human operated machine. Builds the
  28. # snap in a multipass instance, then runs tests in a separate multipass
  29. # instance. This makes the fewest changes to your personal computer,
  30. # but is heavier on system requirements. For a more lightweight test,
  31. # use the "snap" environment above. Beware that you will wind up with
  32. # a lot of things installed, including potentially the locally built
  33. # version of MicroStack!
  34. deps = -r{toxinidir}/test-requirements.txt
  35. setenv =
  36. PATH = /snap/bin:{env:PATH}
  37. MULTIPASS=true
  38. commands =
  39. {toxinidir}/tools/multipass_build.sh
  40. flake8 {toxinidir}/tests/
  41. {toxinidir}/tests/test_basic.py
  42. {toxinidir}/tests/test_control.py
  43. [testenv:basic]
  44. # Just run basic_test.sh, with multipass support.
  45. deps = -r{toxinidir}/test-requirements.txt
  46. setenv =
  47. MULTIPASS=true
  48. commands =
  49. {toxinidir}/tools/basic_setup.sh
  50. flake8 {toxinidir}/tests/
  51. {toxinidir}/tests/test_basic.py
  52. {toxinidir}/tests/test_control.py
  53. [testenv:init_lint]
  54. deps = -r{toxinidir}/tools/init/test-requirements.txt
  55. -r{toxinidir}/tools/init/requirements.txt
  56. commands = flake8 {toxinidir}/tools/init/init/
  57. [testenv:init_unit]
  58. deps = -r{toxinidir}/tools/init/test-requirements.txt
  59. -r{toxinidir}/tools/init/requirements.txt
  60. commands =
  61. stestr run --top-dir=./tools/init/ --test-path=./tools/init/tests/ {posargs}