tox.ini 1.2 KB

1234567891011121314151617181920212223242526272829
  1. # Tox (http://tox.testrun.org/) is a tool for running tests
  2. # in multiple virtualenvs. This configuration file will run the
  3. # test suite on all supported python versions and providers.
  4. # To use it, "pip install tox" and then run "tox" from this directory.
  5. # You will have to set all required environment variables (below) before
  6. # running the tests.
  7. #
  8. # Alternatively, to run mock tests only, run tox as follows:
  9. # CB_USE_MOCK_PROVIDERS=True tox -e py27-aws
  10. #
  11. # Simply running tox -e py27-aws also works, because the default is to use
  12. # mock providers.
  13. [tox]
  14. envlist = {py27,py36,pypy}-{aws,openstack}
  15. [testenv]
  16. commands = flake8 cloudbridge test setup.py
  17. {envpython} -m coverage run --branch --source=cloudbridge --omit=cloudbridge/cloud/interfaces/* setup.py test {posargs}
  18. setenv =
  19. aws: CB_TEST_PROVIDER=aws
  20. openstack: CB_TEST_PROVIDER=openstack
  21. passenv =
  22. CB_USE_MOCK_PROVIDERS
  23. aws: CB_IMAGE_AWS CB_INSTANCE_TYPE_AWS CB_PLACEMENT_AWS AWS_ACCESS_KEY AWS_SECRET_KEY
  24. openstack: CB_IMAGE_OS CB_INSTANCE_TYPE_OS CB_PLACEMENT_OS OS_AUTH_URL OS_PASSWORD OS_PROJECT_NAME OS_TENANT_NAME OS_USERNAME OS_REGION_NAME OS_USER_DOMAIN_NAME OS_PROJECT_DOMAIN_NAME NOVA_SERVICE_NAME
  25. deps =
  26. -rrequirements.txt
  27. coverage