|
- [tox]
- envlist = init_lint, init_unit, multipass
- skipsdist = True
-
- [testenv]
- basepython=python3
- install_command = pip install {opts} {packages}
- setenv =
- PATH = /snap/bin:{env:PATH}
- passenv = HOME TERM
- whitelist_externals =
- sudo
- /snap/bin/snapcraft
-
- [testenv:snap]
- # Testing environment for the gerrit gate. Named 'snap' to conform to
- # the requirements of the snap friendly job that we inherit from in
- # .zuul.yaml.
- basepython=python3
- deps = -r{toxinidir}/test-requirements.txt
- commands =
- {toxinidir}/tools/lxd_build.sh
- flake8 {toxinidir}/tests/
- # Specify tests in sequence, as they can't run in parallel if not
- # using multipass.
- {toxinidir}/tests/test_basic.py
- {toxinidir}/tests/test_control.py
-
- [testenv:multipass]
- # Default testing environment for a human operated machine. Builds the
- # snap in a multipass instance, then runs tests in a separate multipass
- # instance. This makes the fewest changes to your personal computer,
- # but is heavier on system requirements. For a more lightweight test,
- # use the "snap" environment above. Beware that you will wind up with
- # a lot of things installed, including potentially the locally built
- # version of MicroStack!
- deps = -r{toxinidir}/test-requirements.txt
- setenv =
- PATH = /snap/bin:{env:PATH}
- MULTIPASS=true
- commands =
- {toxinidir}/tools/multipass_build.sh
- flake8 {toxinidir}/tests/
- {toxinidir}/tests/test_basic.py
- {toxinidir}/tests/test_control.py
-
- [testenv:basic]
- # Just run basic_test.sh, with multipass support.
- deps = -r{toxinidir}/test-requirements.txt
- setenv =
- MULTIPASS=true
-
- commands =
- {toxinidir}/tools/basic_setup.sh
- flake8 {toxinidir}/tests/
- {toxinidir}/tests/test_basic.py
- {toxinidir}/tests/test_control.py
-
- [testenv:init_lint]
- deps = -r{toxinidir}/tools/init/test-requirements.txt
- -r{toxinidir}/tools/init/requirements.txt
- commands = flake8 {toxinidir}/tools/init/init/
-
- [testenv:init_unit]
- deps = -r{toxinidir}/tools/init/test-requirements.txt
- -r{toxinidir}/tools/init/requirements.txt
- commands =
- stestr run --top-dir=./tools/init/ --test-path=./tools/init/tests/ {posargs}
|