From c07b24a7b44d7bbe6a93f5965ab8679b6208df6a Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 9 Jan 2017 14:13:20 -0500 Subject: [PATCH] Support PYTHON3 gate jobs Look for the DEVSTACK_GATE_USE_PYTHON3 and choose the correct version of python Change-Id: Ib61da6bebb7bed9db7524c5f7faffcb6786c1140 --- tests/ci/rally_gate_functions.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/ci/rally_gate_functions.sh b/tests/ci/rally_gate_functions.sh index 8d687c80..c3a175a9 100644 --- a/tests/ci/rally_gate_functions.sh +++ b/tests/ci/rally_gate_functions.sh @@ -99,12 +99,19 @@ function run () { TASK=$1 TASK_ARGS="$2 $3" - python $RALLY_DIR/tests/ci/osresources.py --dump-list resources_at_start.txt + + if [ "$DEVSTACK_GATE_USE_PYTHON3" = "True" ]; then + PYTHON=python3 + else + PYTHON=python + fi + + $PYTHON $RALLY_DIR/tests/ci/osresources.py --dump-list resources_at_start.txt rally --rally-debug task start --task $TASK $TASK_ARGS mkdir -p rally-plot/extra - python $RALLY_DIR/tests/ci/render.py ci/index.html > rally-plot/extra/index.html + $PYTHON $RALLY_DIR/tests/ci/render.py ci/index.html > rally-plot/extra/index.html cp $TASK rally-plot/task.txt tar -czf rally-plot/plugins.tar.gz -C $RALLY_PLUGINS_DIR . rally task results | python -m json.tool > rally-plot/results.json @@ -124,7 +131,7 @@ function run () { set -e cp resources_at_start.txt rally-plot/ - python $RALLY_DIR/tests/ci/osresources.py\ + $PYTHON $RALLY_DIR/tests/ci/osresources.py\ --compare-with-list resources_at_start.txt\ | gzip > rally-plot/resources_diff.txt.gz