diff options
Diffstat (limited to 'tests/ci')
-rwxr-xr-x | tests/ci/prepare_env.sh | 8 | ||||
-rw-r--r-- | tests/ci/scp_storperf_admin-rc.sh | 16 | ||||
-rw-r--r-- | tests/ci/scp_storperf_files.sh | 37 | ||||
-rwxr-xr-x | tests/ci/yardstick-verify | 15 |
4 files changed, 51 insertions, 25 deletions
diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh index e8f287bcd..c3ee4c76b 100755 --- a/tests/ci/prepare_env.sh +++ b/tests/ci/prepare_env.sh @@ -11,7 +11,7 @@ # Perepare the environment to run yardstick ci : ${DEPLOY_TYPE:='bm'} # Can be any of 'bm' (Bare Metal) or 'virt' (Virtual) - +: ${INSTALLER_TYPE:='unknown'} : ${NODE_NAME:='unknown'} : ${EXTERNAL_NETWORK:='admin_floating_net'} @@ -61,9 +61,9 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME # Prepare a admin-rc file for StorPerf integration $YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh -# copy a admin-rc file for StorPerf integration to the deployment location -if [ "$NODE_NAME" == "huawei-pod1" ]; then - bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh +# copy Storperf related files to the deployment location +if [ "$INSTALLER_TYPE" == "compass" ]; then + source $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_files.sh fi # Fetching id_rsa file from jump_server..." diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_admin-rc.sh deleted file mode 100644 index 7c3896d88..000000000 --- a/tests/ci/scp_storperf_admin-rc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -############################################################################## -# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -# Copy storperf_admin-rc to deployment location. - -ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \ - root@192.168.200.1:/root/ &> /dev/null diff --git a/tests/ci/scp_storperf_files.sh b/tests/ci/scp_storperf_files.sh new file mode 100644 index 000000000..71306eb80 --- /dev/null +++ b/tests/ci/scp_storperf_files.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +############################################################################## +# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +# Copy storperf_admin-rc to deployment location. + +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + +scp_files(){ + export JUMP_HOST_IP + sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \ + root@${JUMP_HOST_IP}:/root/ &> /dev/null + sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/docker-compose.yaml \ + root@${JUMP_HOST_IP}:/root/ &> /dev/null +} + +case "$NODE_NAME" in + "huawei-pod1") + JUMP_HOST_IP='192.168.10.6' + scp_files + ;; + "huawei-pod2") + JUMP_HOST_IP='192.168.11.2' + scp_files + ;; + *) + # no node name, exit + echo "storperf test case will not run on this pod, skipping scp files..." + ;; +esac diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify index 096ea534f..16598df7b 100755 --- a/tests/ci/yardstick-verify +++ b/tests/ci/yardstick-verify @@ -99,8 +99,8 @@ set -o pipefail install_storperf() { - # Install Storper on huawei-pod1 - if [ "$NODE_NAME" == "huawei-pod1" ]; then + # Install Storper on huawei-pod1 and huawei-pod2 + if [ "$NODE_NAME" == "huawei-pod1" -o "$NODE_NAME" == "huawei-pod2" ]; then echo echo "========== Installing storperf ==========" @@ -114,8 +114,8 @@ install_storperf() remove_storperf() { - # remove Storper from huawei-pod1 - if [ "$NODE_NAME" == "huawei-pod1" ]; then + # remove Storper from huawei-pod1 and huawei-pod2 + if [ "$NODE_NAME" == "huawei-pod1" -o "$NODE_NAME" == "huawei-pod2" ]; then echo echo "========== Removing storperf ==========" @@ -293,8 +293,13 @@ main() echo # check OpenStack services + if [[ $OS_INSECURE ]] && [[ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]]; then + SECURE="--insecure" + else + SECURE="" + fi echo "Checking OpenStack services:" - for cmd in "openstack image list" "openstack server list" "openstack stack list"; do + for cmd in "openstack ${SECURE} image list" "openstack ${SECURE} server list" "openstack ${SECURE} stack list"; do echo " checking ${cmd} ..." if ! $cmd >/dev/null; then echo "error: command \"$cmd\" failed" |