diff --git a/novaclient/tests/functional/api/test_servers.py b/novaclient/tests/functional/api/test_servers.py index 5615eb849..df6671fa2 100644 --- a/novaclient/tests/functional/api/test_servers.py +++ b/novaclient/tests/functional/api/test_servers.py @@ -22,7 +22,7 @@ class TestServersAPI(base.ClientTestBase): server_name, self.image, self.flavor) self.addCleanup(initial_server.delete) - for x in xrange(60): + for x in range(60): server = self.client.servers.get(initial_server) if server.status == "ACTIVE": break diff --git a/novaclient/tests/functional/hooks/post_test_hook.sh b/novaclient/tests/functional/hooks/post_test_hook.sh index a07bd0c63..f58d8bb6f 100755 --- a/novaclient/tests/functional/hooks/post_test_hook.sh +++ b/novaclient/tests/functional/hooks/post_test_hook.sh @@ -43,7 +43,7 @@ cd $NOVACLIENT_DIR echo "Running novaclient functional test suite" set +e # Preserve env for OS_ credentials -sudo -E -H -u jenkins tox -efunctional +sudo -E -H -u jenkins tox -e ${TOX_ENV:-functional} EXIT_CODE=$? set -e diff --git a/tox.ini b/tox.ini index ba335c1dc..845523a4c 100644 --- a/tox.ini +++ b/tox.ini @@ -35,6 +35,13 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen [testenv:functional] +basepython = python2.7 +setenv = + OS_TEST_PATH = ./novaclient/tests/functional +commands = python setup.py testr --testr-args='--concurrency=1 {posargs}' + +[testenv:functional-py34] +basepython = python3.4 setenv = OS_TEST_PATH = ./novaclient/tests/functional commands = python setup.py testr --testr-args='--concurrency=1 {posargs}'