| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- [tox]
- minversion = 4.0.2
- envlist = py3,pep8,cover
- skipsdist = True
- [vars]
- all_path = {toxinidir}
- [testenv]
- usedevelop = True
- setenv = VIRTUAL_ENV={envdir}
- deps =
- -r{toxinidir}/test-requirements.txt
- -r{toxinidir}/requirements.txt
- git+https://github.com/cloudbase/python-coriolisclient.git
- commands = stestr run --slowest --exclude-regex coriolis.tests.integration {posargs}
- [testenv:fmt]
- description = Format the code based on the coding style standards.
- deps =
- ruff
- commands =
- ruff check --fix {[vars]all_path}
- ruff format {[vars]all_path}
- [testenv:pep8]
- description = Verify the coding style (pep8).
- deps =
- ruff
- flake8>=7.0.0
- pyflakes>=3.2.0
- hacking>=7.0.0,<7.1.0
- commands =
- ruff format --diff {[vars]all_path}
- ruff check {[vars]all_path}
- flake8 {[vars]all_path}
- [testenv:cover]
- setenv =
- {[testenv]setenv}
- PYTHON=coverage run --source coriolis --parallel-mode
- commands =
- stestr run --no-subunit-trace --exclude-regex coriolis.tests.integration {posargs}
- coverage combine
- coverage report --fail-under=82 --skip-covered
- coverage html -d cover
- coverage xml -o cover/coverage.xml
- [testenv:integration]
- # Must be run as root: sudo -E tox -e integration
- # Requires losetup support (loop devices).
- #
- # To test with external providers, set CORIOLIS_SOURCE_PROVIDER_PACKAGE
- # and / or CORIOLIS_DESTINATION_PROVIDER_PACKAGE to a local path or
- # pip-compatible specifier (git+file://, git+https://, etc.) for the
- # provider package to install, and run:
- # sudo -E CORIOLIS_SOURCE_PROVIDER_PACKAGE=/path/to/provider-a \
- # CORIOLIS_DESTINATION_PROVIDER_PACKAGE=/path/to/provider-b \
- # tox -e integration
- setenv =
- {[testenv]setenv}
- PBR_VERSION = 0.0.1
- passenv =
- CORIOLIS_*
- LD_LIBRARY_PATH
- deps =
- {[testenv]deps}
- git+https://github.com/cloudbase/python-coriolisclient.git
- {env:CORIOLIS_SOURCE_PROVIDER_PACKAGE:}
- {env:CORIOLIS_DESTINATION_PROVIDER_PACKAGE:}
- commands = stestr run --slowest --concurrency=1 --test-path coriolis/tests/integration/ {posargs}
- [testenv:venv]
- commands = {posargs}
- [coverage:run]
- source = coriolis
- omit = coriolis/tests/*
- [flake8]
- # E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
- # E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
- #
- # E501 (line too long) is left to ruff line-length option
- # E203 (whitespace before ':') conflicts with how ruff formats slices.
- # H301: Do not import more than one module per line (*)
- # H306: Alphabetically order your imports by the full module path
- ignore = E125,E251,W503,W504,E305,E731,E117,W605,F632,H401,H403,H404,H405,H202,E501,E203,H301,H306
- exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|