X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=run_tests.sh;h=19312935d3810448d2fe210d2dea383bdf4cec6d;hb=254894a18c5b3cda0be164d595a6367978688d99;hp=b87d2fcbf5f1440a5166e1ee6f39ed3f16ea3ad6;hpb=87d58363042410a1641fd97734d45c17b4acb0e5;p=bottlenecks.git diff --git a/run_tests.sh b/run_tests.sh index b87d2fcb..19312935 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -33,10 +33,10 @@ function check_testcase(){ check_suite="$1" case $check_suite in "-rubbos") - $SUITE_PREFIX=$SUITE_PREFIX_CONFIG/rubbos/testcase_cfg + SUITE_PREFIX=$SUITE_PREFIX_CONFIG/rubbos/testcase_cfg ;; "-vstf") - $SUITE_PREFIX=$SUITE_PREFIX_CONFIG/vstf/testcase_cfg + SUITE_PREFIX=$SUITE_PREFIX_CONFIG/vstf/testcase_cfg ;; esac @@ -47,10 +47,10 @@ function check_testcase(){ all_testcases_insuite=`cat /tmp/all_testcases.yaml | awk -F '/' '{print $NF}' | awk -F '.' '{print $1}'` all_testcases=(${all_testcases_insuite}) - if ["${TEST_CASE}" != ""]; then + if [ "${TEST_CASE}" != "" ]; then testcase_exec=(${TEST_CASE// /}) for i in "${testcase_exec[@]}"; do - if [[ " ${all_test_cases[*]} " != *" $i "* ]]; then + if [[ " ${all_testcases[*]} " != *" $i "* ]]; then error "unknown test case: $i. available test cases are: ${all_test_cases[@]}" fi done @@ -71,15 +71,15 @@ function run_test(){ if [[ -f $test_file ]]; then testcases=($(cat $test_file)) else - error("no rubbos test suite file ") + error "no rubbos test suite file" fi for i in "${testcases[@]}"; do #check if the testcase is legal or not check_testcase -rubbos $i #adjust config parameters, different test suite has different methods, take rubbos as an example #run test case, different test suite has different methods - file={$BASEDIR}/testsuites/rubbos/testcase_cfg/{$i}.yaml - python ${BOTTLENECK_TOP_DIR}/testsuites/rubbos/run_rubbos.py $file + file=${BASEDIR}/testsuites/rubbos/testcase_cfg/${i}.yaml + python /home/opnfv/bottlenecks/testsuites/rubbos/run_rubbos.py -c $file done ;; "vstf") @@ -88,13 +88,15 @@ function run_test(){ if [[ -f $test_file ]]; then testcases=($(cat $test_file)) else - error("no vstf test suite file ") + error "no vstf test suite file " fi for i in "${testcases[@]}"; do #check if the testcase is legal or not check_testcase -vstf $i #adjust config parameters #run test case + file=${BASEDIR}/testsuites/vstf/testcase_cfg/${i}.yaml + python /home/opnfv/bottlenecks/testsuites/vstf/run_vstf.py -c $file done ;; esac @@ -138,6 +140,10 @@ if [ "${SUITE}" != "" ]; then info "Tests to execute: ${SUITE}" fi +# Source credentials +info "Sourcing Credentials openstack.creds to run the tests.." +source /home/opnfv/bottlenecks/config/openstack.creds + #run tests if [ "${SUITE}" != "" ]; then for i in "${suite_exec[@]}"; do