aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ci
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ci')
-rwxr-xr-xtests/ci/ansible_load_images.sh5
-rwxr-xr-xtests/ci/apexlake-verify29
-rwxr-xr-xtests/ci/yardstick-verify72
3 files changed, 40 insertions, 66 deletions
diff --git a/tests/ci/ansible_load_images.sh b/tests/ci/ansible_load_images.sh
index 4f62024db..9a2d8ef18 100755
--- a/tests/ci/ansible_load_images.sh
+++ b/tests/ci/ansible_load_images.sh
@@ -24,9 +24,4 @@ ansible-playbook \
-e img_modify_playbook='ubuntu_server_cloudimg_modify.yml' \
-e target_os='Ubuntu' \
-e YARD_IMG_ARCH='amd64' \
- -e target_os_version='16.04' \
- -e target_os_family='Debian' \
- -e clone_dest='/usr/local/src' \
- -e ubuntu_image='yardstick-trusty-server.raw' \
- -e ubuntu_image_file='/tmp/workspace/yardstick/yardstick-trusty-server.raw' \
-vvv -i inventory.ini load_images.yml
diff --git a/tests/ci/apexlake-verify b/tests/ci/apexlake-verify
deleted file mode 100755
index 6a691063f..000000000
--- a/tests/ci/apexlake-verify
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2015 Ericsson AB 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
-##############################################################################
-
-DPDK_HOST=10.118.36.130
-
-YARDSTICK=/home/user/yardstick
-TESTSUITE=$YARDSTICK/tests/opnfv/test_suites/opnfv_vTC_daily.yaml
-
-: ${INSTALLER_TYPE:='unknown'}
-: ${NODE_NAME:='unknown'}
-: ${DEPLOY_SCENARIO:='unknown'}
-
-commands="
-cd $YARDSTICK
-source /home/user/openrc.dasm
-export INSTALLER_TYPE=$INSTALLER_TYPE
-export NODE_NAME=$NODE_NAME
-export DEPLOY_SCENARIO=$DEPLOY_SCENARIO
-sudo -E yardstick task start --suite $TESTSUITE"
-
-echo "$commands" | ssh -l user $DPDK_HOST 'bash -s'
-exit $?
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index 16598df7b..f3e7a49e3 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -87,7 +87,9 @@ error_exit()
exitcode=$rc
fi
- cleanup
+ if [[ "${DEPLOY_SCENARIO:0:2}" == 'os' ]];then
+ source "${YARDSTICK_REPO_DIR}/tests/ci/clean_images.sh"
+ fi
echo "Exiting with RC=$exitcode"
@@ -248,6 +250,38 @@ EOF
}
+check_openstack(){
+ # check if some necessary variables is set
+ if [ -z "$OS_AUTH_URL" ]; then
+ echo "OS_AUTH_URL is unset or empty"
+ exit 1
+ fi
+
+ echo "OS_AUTH_URL is $OS_AUTH_URL"
+ 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 ${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"
+ exit 1
+ fi
+ done
+
+ echo
+ echo "Checking for External network:"
+ for net in $(openstack network list --external -c Name -f value); do
+ echo " external network: $net"
+ done
+}
+
main()
{
GITROOT=$(cd $(dirname $0) && git rev-parse --show-toplevel)
@@ -283,41 +317,15 @@ main()
done
echo
- # check if some necessary variables is set
- if [ -z "$OS_AUTH_URL" ]; then
- echo "OS_AUTH_URL is unset or empty"
- exit 1
- fi
+ trap "error_exit" EXIT SIGTERM
- echo "OS_AUTH_URL is $OS_AUTH_URL"
- echo
+ if [[ "${DEPLOY_SCENARIO:0:2}" == "os" ]];then
+ check_openstack
- # check OpenStack services
- if [[ $OS_INSECURE ]] && [[ "$(echo $OS_INSECURE | tr '[:upper:]' '[:lower:]')" = "true" ]]; then
- SECURE="--insecure"
- else
- SECURE=""
+ source $YARDSTICK_REPO_DIR/tests/ci/clean_images.sh
+ source $YARDSTICK_REPO_DIR/tests/ci/load_images.sh
fi
- echo "Checking OpenStack services:"
- 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"
- exit 1
- fi
- done
-
- echo
- echo "Checking for External network:"
- for net in $(openstack network list --external -c Name -f value); do
- echo " external network: $net"
- done
-
- source $YARDSTICK_REPO_DIR/tests/ci/clean_images.sh
-
- trap "error_exit" EXIT SIGTERM
- source $YARDSTICK_REPO_DIR/tests/ci/load_images.sh
install_storperf
run_test
remove_storperf