diff options
author | MatthewLi <matthew.lijun@huawei.com> | 2016-03-28 09:16:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2016-03-28 09:16:27 +0000 |
commit | 87d58363042410a1641fd97734d45c17b4acb0e5 (patch) | |
tree | 6961c5bc2f77029f77a6a1869a133efba0d59c08 /testsuites | |
parent | c61fcf46ecabd718f92541e2de53ed027b241f78 (diff) | |
parent | 3c0f6d5ced2474240fa14f5594b84c527767edca (diff) |
Merge "improvement: rubbos test suite running workflow"
Diffstat (limited to 'testsuites')
-rwxr-xr-x | testsuites/rubbos/run_rubbos.py | 0 | ||||
-rwxr-xr-x | testsuites/rubbos/run_rubbos.sh | 70 | ||||
-rwxr-xr-x | testsuites/rubbos/testcase_cfg/rubbos_1-1-1.yaml | 24 | ||||
-rwxr-xr-x | testsuites/rubbos/testcase_cfg/rubbos_1-2-1.yaml | 24 |
4 files changed, 118 insertions, 0 deletions
diff --git a/testsuites/rubbos/run_rubbos.py b/testsuites/rubbos/run_rubbos.py new file mode 100755 index 00000000..e69de29b --- /dev/null +++ b/testsuites/rubbos/run_rubbos.py diff --git a/testsuites/rubbos/run_rubbos.sh b/testsuites/rubbos/run_rubbos.sh index e69de29b..b7492adc 100755 --- a/testsuites/rubbos/run_rubbos.sh +++ b/testsuites/rubbos/run_rubbos.sh @@ -0,0 +1,70 @@ +#!/bin/bash +############################################################################### +# Copyright (c) 2015 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 +############################################################################## + +usage="Script to run the tests in rubbos. + +usage: + bash $(basename "$0") [-h|--help] [-s <test suite>] + +where: + -h|--help show the help text + -t|--test run specifif test case scenario + <test case> examples: + rubbos_1-1-1, rubbos_1-2-1 + +examples: + $(basename "$0") + $(basename "$0") -t rubbos_1-1-1" + +while [[ $# > 0 ]] + do + key="$1" + case $key in + -h|--help) + echo "$usage" + exit 0 + shift + ;; + -t|--test) + CASE="$2" + shift + ;; + *) + echo "unkown option $1 $2" + exit 1 + ;; + esac + shift +done + +BASEDIR=`dirname $0` + +#has been checked in upper layer run_tests.sh +#run tests +if [ "${CASE}" != "" ]; then + case_exec=(${CASE//,/}) + for case_exe in "${case_exec[@]}"; do + client_num=4 + tomcat_num=$(echo "$case_exe"| awk -F '-' '{print $2}') + mysql_num=$(echo "$case_exe"| awk -F '-' '{print $3') + + hosts=(rubbos_control rubbos_benchmark rubbos_httpd) + for((i=1; i <= client_num; i++)); do + hosts=(${hosts[*]} client$i) + done + for((i=1; i <= tomcat_num; i++)); do + hosts=(${hosts[*]} tomcat$i) + done + for((i=1; i <= mysql_num; i++)); do + hosts=(${hosts[*]} mysql$i) + done + bash $BOTTLENECKS_TOP_DIR/utils/infra_setup/heat_template/rubbos_heat_template/HOT_create_instance.sh + done +fi diff --git a/testsuites/rubbos/testcase_cfg/rubbos_1-1-1.yaml b/testsuites/rubbos/testcase_cfg/rubbos_1-1-1.yaml index e69de29b..cb590c0a 100755 --- a/testsuites/rubbos/testcase_cfg/rubbos_1-1-1.yaml +++ b/testsuites/rubbos/testcase_cfg/rubbos_1-1-1.yaml @@ -0,0 +1,24 @@ +--- + +description: + casename: "rubbos_1-1-1" + +amount: + client_num: 5 + httpd_num: 1 + tomcat_num: 1 + mysql_num: 1 + +vms: + client_vm: + flavor: "m1.tiny" + OS_image: "ubuntu14.04" + httpd_vm: + flavor: "m1.tiny" + OS_image: "ubuntu14.04" + tomcat_vm: + flavor: "m1.tiny" + OS_image: "ubuntu14.04" + mysql_vm: + flavor: "m1.medium" + OS_image: "ubuntu14.04" diff --git a/testsuites/rubbos/testcase_cfg/rubbos_1-2-1.yaml b/testsuites/rubbos/testcase_cfg/rubbos_1-2-1.yaml index e69de29b..3a6e448f 100755 --- a/testsuites/rubbos/testcase_cfg/rubbos_1-2-1.yaml +++ b/testsuites/rubbos/testcase_cfg/rubbos_1-2-1.yaml @@ -0,0 +1,24 @@ +--- + +description: + casename: "rubbos_1-1-1" + +amount: + client_num: 5 + httpd_num: 1 + tomcat_num: 2 + mysql_num: 1 + +vms: + client_vm: + flavor: "m1.tiny" + OS_image: "ubuntu14.04" + httpd_vm: + flavor: "m1.tiny" + OS_image: "ubuntu14.04" + tomcat_vm: + flavor: "m1.tiny" + OS_image: "ubuntu14.04" + mysql_vm: + flavor: "m1.medium" + OS_image: "ubuntu14.04" |