summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ci/yardstick-verify68
1 files changed, 37 insertions, 31 deletions
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