From bed6b78c6f0eca25bed3c4b6bb530ff07068ec4b Mon Sep 17 00:00:00 2001 From: OpenStack Proposal Bot Date: Wed, 9 May 2018 19:43:22 +0000 Subject: [PATCH] Updated from OpenStack Ansible Tests Change-Id: Ib843de66945e24858e0a967646b983dd2e6568f0 --- Vagrantfile | 13 ++++--------- run_tests.sh | 15 ++++++++------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 79d67de..c7ac466 100755 --- a/Vagrantfile +++ b/Vagrantfile @@ -16,7 +16,7 @@ end Vagrant.configure(2) do |config| config.vm.provider "virtualbox" do |v| - v.memory = 4096 + v.memory = 6144 v.cpus = 2 end @@ -30,20 +30,15 @@ Vagrant.configure(2) do |config| SHELL config.vm.define "ubuntu1604" do |xenial| - xenial.disksize.size = "40GB" - xenial.vm.box = "ubuntu/xenial64" - end - - config.vm.define "opensuse422" do |leap422| - leap422.vm.box = "opensuse/openSUSE-42.2-x86_64" + xenial.vm.box = "bento/ubuntu-16.04" end config.vm.define "opensuse423" do |leap423| - leap423.vm.box = "opensuse/openSUSE-42.3-x86_64" + leap423.vm.box = "bento/opensuse-leap-42.3" end config.vm.define "centos7" do |centos7| - centos7.vm.box = "centos/7" + centos7.vm.box = "bento/centos-7" end end 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 *suse*) pkg_mgr_cmd="zypper -n in" ;; centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;; ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; + gentoo) pkg_mgr_cmd="emerge" ;; *) echo "unsupported distribution: ${ID,,}"; exit 1 ;; esac -# Install git so that we can clone the tests repo -eval sudo $pkg_mgr_cmd git +# Install git so that we can clone the tests repo if git is not available +which git &>/dev/null || eval sudo "${pkg_mgr_cmd}" git # Clone the tests repo for access to the common test script -if [[ ! -d ${COMMON_TESTS_PATH} ]]; then +if [[ ! -d "${COMMON_TESTS_PATH}" ]]; then # The tests repo doesn't need a clone, we can just # symlink it. if [[ "$(basename ${WORKING_DIR})" == "openstack-ansible-tests" ]]; then - ln -s ${WORKING_DIR} ${COMMON_TESTS_PATH} + ln -s "${WORKING_DIR}" "${COMMON_TESTS_PATH}" # In zuul v3 any dependent repository is placed into # /home/zuul/src/git.openstack.org, so we check to see # if there is a tests checkout there already. If so, we # symlink that and use it. elif [[ -d "${ZUUL_TESTS_CLONE_LOCATION}" ]]; then - ln -s "${ZUUL_TESTS_CLONE_LOCATION}" ${COMMON_TESTS_PATH} + ln -s "${ZUUL_TESTS_CLONE_LOCATION}" "${COMMON_TESTS_PATH}" # Otherwise we're clearly not in zuul or using a previously setup # repo in some way, so just clone it from upstream. else - git clone -b ${TESTING_BRANCH} \ + git clone -b "${TESTING_BRANCH}" \ https://git.openstack.org/openstack/openstack-ansible-tests \ - ${COMMON_TESTS_PATH} + "${COMMON_TESTS_PATH}" fi fi