-function check_testcase(){
-
- check_suite="$1"
- case $check_suite in
- "-rubbos")
- SUITE_PREFIX=$SUITE_PREFIX_CONFIG/rubbos/testcase_cfg
- ;;
- "-vstf")
- SUITE_PREFIX=$SUITE_PREFIX_CONFIG/vstf/testcase_cfg
- ;;
- "-posca")
- SUITE_PREFIX=$SUITE_PREFIX_CONFIG/posca/testcase_cfg
- ;;
- esac
-
- TEST_CASE=$2
-
- #find all the test case yaml files first
- find $SUITE_PREFIX -name "*yaml" > /tmp/all_testcases.yaml
- 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
- testcase_exec=(${TEST_CASE// /})
- for i in "${testcase_exec[@]}"; do
- if [[ " ${all_testcases[*]} " != *" $i "* ]]; then
- error "unknown test case: $i. available test cases are: ${all_test_cases[@]}"
- fi
- done
- info "tests to execute: ${TEST_CASE}."
- else
- error "lack of testcase name"
- fi
-}