Add Factor Testcase RX_PKT_Size
[bottlenecks.git] / run_tests.sh
index 093f724..ad0b31c 100755 (executable)
@@ -26,7 +26,7 @@ examples:
 
 report=true
 
-arr_test_suite=(rubbos vstf)
+arr_test_suite=(rubbos vstf posca)
 
 function check_testcase(){
 
@@ -38,6 +38,9 @@ function check_testcase(){
          "-vstf")
              SUITE_PREFIX=$SUITE_PREFIX_CONFIG/vstf/testcase_cfg
          ;;
+         "-posca")
+             SUITE_PREFIX=$SUITE_PREFIX_CONFIG/posca/testcase_cfg
+         ;;
     esac
 
     TEST_CASE=$2
@@ -78,13 +81,13 @@ function run_test(){
                 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
+                file=${BASEDIR}/testsuites/rubbos/testcase_cfg/${i}.yaml
                 python /home/opnfv/bottlenecks/testsuites/rubbos/run_rubbos.py -c $file
             done
         ;;
         "vstf")
             info "Running vstf test suite"
-            test_file="/home/opnfv/bottlenecks/testsuite/vstf/testsuite_story/vstf_story1"
+            test_file="/home/opnfv/bottlenecks/testsuites/vstf/testsuite_story/vstf_story1"
             if [[ -f $test_file ]]; then
                 testcases=($(cat $test_file))
             else
@@ -95,6 +98,25 @@ function run_test(){
                 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
+        ;;
+        "posca")
+            info "Running posca test suite"
+            test_file="/home/opnfv/bottlenecks/testsuites/posca/testsuite_story/posca_factor_test"
+            if [[ -f $test_file ]]; then
+                testcases=($(cat $test_file))
+            else
+                error "no posca test suite file "
+            fi
+            for i in "${testcases[@]}"; do
+                #check if the testcase is legal or not
+                check_testcase -posca $i
+                #adjust config parameters
+                #run test case
+                file=${BASEDIR}/testsuites/posca/testcase_cfg/${i}.yaml
+                python /home/opnfv/bottlenecks/testsuites/posca/run_posca.py -c $file
             done
         ;;
     esac
@@ -138,6 +160,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