From dad52c1fe29ca4d784734b07673a5485b66f1666 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 21 Mar 2016 11:41:34 -0400 Subject: [PATCH] Add a py34 functional test for rabbit fix up post_test_hook.sh so we can pass in py34 in zuul definitions. Change-Id: Ibc695762fb12b60a8094be187001dd2bd42f402e --- oslo_messaging/tests/functional/gate/post_test_hook.sh | 5 +++-- tox.ini | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/oslo_messaging/tests/functional/gate/post_test_hook.sh b/oslo_messaging/tests/functional/gate/post_test_hook.sh index 23ee6ab48..66cfaf29c 100755 --- a/oslo_messaging/tests/functional/gate/post_test_hook.sh +++ b/oslo_messaging/tests/functional/gate/post_test_hook.sh @@ -15,10 +15,11 @@ # This script is executed inside post_test_hook function in devstack gate. RPC_BACKEND=$1 +PYTHON=${2:-py27} function generate_testr_results { if [ -f .testrepository/0 ]; then - sudo .tox/py27-func-${RPC_BACKEND}/bin/testr last --subunit > $WORKSPACE/testrepository.subunit + sudo .tox/${PYTHON}-func-${RPC_BACKEND}/bin/testr last --subunit > $WORKSPACE/testrepository.subunit sudo mv $WORKSPACE/testrepository.subunit $BASE/logs/testrepository.subunit sudo /usr/os-testr-env/bin/subunit2html $BASE/logs/testrepository.subunit $BASE/logs/testr_results.html sudo gzip -9 $BASE/logs/testrepository.subunit @@ -61,7 +62,7 @@ cd $BASE/new/oslo.messaging # Run tests echo "Running oslo.messaging functional test suite" # Preserve env for OS_ credentials -sudo -E -H -u jenkins tox -e py27-func-$RPC_BACKEND +sudo -E -H -u jenkins tox -e ${PYTHON}-func-$RPC_BACKEND EXIT_CODE=$? set -e diff --git a/tox.ini b/tox.ini index b8a3a6ae6..66f39c230 100644 --- a/tox.ini +++ b/tox.ini @@ -27,6 +27,10 @@ commands = python setup.py build_sphinx [testenv:py27-func-rabbit] commands = {toxinidir}/setup-test-env-rabbit.sh python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional' +[testenv:py34-func-rabbit] +basepython = python3.4 +commands = {toxinidir}/setup-test-env-rabbit.sh python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional' + [testenv:py27-func-pika] commands = {toxinidir}/setup-test-env-pika.sh python setup.py testr --slowest --testr-args='oslo_messaging.tests.functional'