Merge "Add tox targets for functional testing on 2 and 3"

This commit is contained in:
Jenkins
2015-09-21 14:35:05 +00:00
committed by Gerrit Code Review
2 changed files with 21 additions and 7 deletions

View File

@@ -82,15 +82,19 @@ Replace ``xxx.xxx.xxx.xxx`` with the IP address or FQDN of your DevStack instanc
Run Run
*** ***
In order to run the entire functional test suite, simply run the Functional tests are run against both Python 2 and 3. In order to run the
``tox -e functional`` command inside of your source checkout. This will entire functional test suite, run the ``tox -e functional`` and
``tox -e functional3`` command inside of your source checkout. This will
attempt to run every test command under ``/openstack/tests/functional/`` attempt to run every test command under ``/openstack/tests/functional/``
in the source tree. The functional tests are run with your system Python in the source tree. You should run the full functional test suite before
interpreter. You should run the full functional test suite before submitting submitting changes for review in order to avoid unexpected failures in
changes for review in order to avoid unexpected failures in the continuous the continuous integration system.::
integration system.::
(sdk3)$ tox -e functional (sdk3)$ tox -e functional
... ...
functional: commands succeeded functional: commands succeeded
congratulations :) congratulations :)
(sdk3)$ tox -e functional3
...
functional3: commands succeeded
congratulations :)

12
tox.ini
View File

@@ -11,10 +11,20 @@ setenv =
deps = -r{toxinidir}/test-requirements.txt deps = -r{toxinidir}/test-requirements.txt
commands = ostestr {posargs} commands = ostestr {posargs}
[testenv:functional] [functionalbase]
setenv = OS_TEST_PATH=./openstack/tests/functional setenv = OS_TEST_PATH=./openstack/tests/functional
passenv = OS_* passenv = OS_*
[testenv:functional]
basepython = python2.7
setenv = {[functionalbase]setenv}
passenv = {[functionalbase]passenv}
[testenv:functional3]
basepython = python3.4
setenv = {[functionalbase]setenv}
passenv = {[functionalbase]passenv}
[testenv:pep8] [testenv:pep8]
commands = flake8 commands = flake8