diff options
Diffstat (limited to 'tests/ci')
-rwxr-xr-x | tests/ci/apexlake-verify | 29 | ||||
-rwxr-xr-x | tests/ci/yardstick-verify | 68 |
2 files changed, 37 insertions, 60 deletions
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..ca8a0b27a 100755 --- a/tests/ci/yardstick-verify +++ b/tests/ci/yardstick-verify @@ -248,6 +248,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 +315,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 |