From d5bd526f11e69059f1f3cdc3898c9251b04b65b8 Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Thu, 28 Mar 2019 14:46:06 -0400 Subject: [PATCH] [tests] Fix PYTHON3_VERSION The pre test hook for gate tests has a faulty test for whether the PYTHON3_VERSION variable is set and as a result puts a blank value for this variable in local.conf when it is not set instead of leaving it out of local.conf altogether. This causes jobs running with USE_PYTHON3=True and no explict version setting to actually run manila under python 2.7 because that is what devstack itself defaults for pip installs if the version is not set (or auto-detected in devstack when local.conf does not contain the PYTHON3_VERSION variable at all). So correct the condition in our pre-test hook so that it only inserts a PYTHON3_VERSION in local.conf if that version has been supplied. Closes-bug: #1822178 Change-Id: Ie37595bde17d18770d82fb7fd6475dcfab74a543 --- contrib/ci/pre_test_hook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/ci/pre_test_hook.sh b/contrib/ci/pre_test_hook.sh index 81f54f317f..ec00e1fdfe 100755 --- a/contrib/ci/pre_test_hook.sh +++ b/contrib/ci/pre_test_hook.sh @@ -29,8 +29,8 @@ echo "VOLUME_BACKING_FILE_SIZE=22G" >> $localconf echo "CINDER_LVM_TYPE=thin" >> $localconf # Set DevStack's PYTHON3_VERSION variable if CI scripts specify it -if ! [[ -z "PYTHON3_VERSION" ]]; then -echo "PYTHON3_VERSION=$PYTHON3_VERSION" >> $localconf +if [[ ! -z "$PYTHON3_VERSION" ]]; then + echo "PYTHON3_VERSION=$PYTHON3_VERSION" >> $localconf fi # NOTE(mkoderer): switch to keystone v3 by default