summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenStack Proposal Bot <openstack-infra@lists.openstack.org>2018-04-30 05:13:05 +0000
committerMohammed Naser <mnaser@vexxhost.com>2018-05-07 19:42:23 +0000
commit47b2ddd3758b589c2ec08611e4eca6bf1a8bfae0 (patch)
tree37ae14a24297cc7604271932f0ccb8f978317afd
parentcd0281752cdfefeb8c5f5d6676000fd09aa0c39d (diff)
Updated from OpenStack Ansible Tests
Notes
Notes (review): Code-Review+2: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Code-Review+2: Jean-Philippe Evrard <jean-philippe@evrard.me> Workflow+1: Jean-Philippe Evrard <jean-philippe@evrard.me> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Tue, 08 May 2018 07:58:52 +0000 Reviewed-on: https://review.openstack.org/565104 Project: openstack/openstack-ansible-os_almanach Branch: refs/heads/master
-rwxr-xr-xrun_tests.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/run_tests.sh b/run_tests.sh
index a31f946..4280085 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -58,32 +58,33 @@ case ${ID,,} in
58 *suse*) pkg_mgr_cmd="zypper -n in" ;; 58 *suse*) pkg_mgr_cmd="zypper -n in" ;;
59 centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;; 59 centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;;
60 ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; 60 ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
61 gentoo) pkg_mgr_cmd="emerge" ;;
61 *) echo "unsupported distribution: ${ID,,}"; exit 1 ;; 62 *) echo "unsupported distribution: ${ID,,}"; exit 1 ;;
62esac 63esac
63 64
64# Install git so that we can clone the tests repo 65# Install git so that we can clone the tests repo if git is not available
65eval sudo $pkg_mgr_cmd git 66which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git
66 67
67# Clone the tests repo for access to the common test script 68# Clone the tests repo for access to the common test script
68if [[ ! -d ${COMMON_TESTS_PATH} ]]; then 69if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then
69 # The tests repo doesn't need a clone, we can just 70 # The tests repo doesn't need a clone, we can just
70 # symlink it. 71 # symlink it.
71 if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then 72 if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then
72 ln -s ${WORKING_DIR} ${COMMON_TESTS_PATH} 73 ln -s "${WORKING_DIR}" "${COMMON_TESTS_PATH}"
73 74
74 # In zuul v3 any dependent repository is placed into 75 # In zuul v3 any dependent repository is placed into
75 # /home/zuul/src/git.openstack.org, so we check to see 76 # /home/zuul/src/git.openstack.org, so we check to see
76 # if there is a tests checkout there already. If so, we 77 # if there is a tests checkout there already. If so, we
77 # symlink that and use it. 78 # symlink that and use it.
78 elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then 79 elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then
79 ln -s "${ZUUL_TESTS_CLONE_LOCATION}" ${COMMON_TESTS_PATH} 80 ln -s "${ZUUL_TESTS_CLONE_LOCATION}" "${COMMON_TESTS_PATH}"
80 81
81 # Otherwise we're clearly not in zuul or using a previously setup 82 # Otherwise we're clearly not in zuul or using a previously setup
82 # repo in some way, so just clone it from upstream. 83 # repo in some way, so just clone it from upstream.
83 else 84 else
84 git clone -b ${TESTING_BRANCH} \ 85 git clone -b "${TESTING_BRANCH}" \
85 https://git.openstack.org/openstack/openstack-ansible-tests \ 86 https://git.openstack.org/openstack/openstack-ansible-tests \
86 ${COMMON_TESTS_PATH} 87 "${COMMON_TESTS_PATH}"
87 fi 88 fi
88fi 89fi
89 90