Merge "Fix tacker client dependencies installation"
[functest.git] / ci / exec_test.sh
index c206a9b..519ade4 100755 (executable)
@@ -83,7 +83,8 @@ function run_test(){
                 ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/start_tests.sh
 
             # push results to the DB in case of CI
-            if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" &&
+            if [[ "$report" == "-r" &&
+                  -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" &&
                   -n "$INSTALLER_TYPE" && "$INSTALLER_TYPE" != "none" ]] &&
                env | grep NODE_NAME > /dev/null; then
                 odl_logs="/home/opnfv/functest/results/odl/logs/2"
@@ -114,11 +115,7 @@ function run_test(){
             python ${FUNCTEST_REPO_DIR}/testcases/features/bgpvpn.py
         ;;
         "onos")
-            if [ "$INSTALLER_TYPE" == "joid" ]; then
-                python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py -i joid
-            else
-                python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py
-            fi
+            python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py
       ;;
         "promise")
             python ${FUNCTEST_REPO_DIR}/testcases/features/promise.py $report
@@ -129,17 +126,25 @@ function run_test(){
         ;;
         "ovno")
             # suite under rewritting for colorado
-            # no need to run anything until refactoring done 
+            # no need to run anything until refactoring done
             # ${repos_dir}/ovno/Testcases/RunTests.sh
         ;;
         "security_scan")
-            # TODO
-            # call you script here....
+            echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/stackrc for undercloud .."
+            source ${FUNCTEST_CONF_DIR}/stackrc
+            python ${FUNCTEST_REPO_DIR}/testcases/security_scan/security_scan.py --config ${FUNCTEST_REPO_DIR}/testcases/security_scan/config.ini
+        ;;
+        "copper")
+            python ${FUNCTEST_REPO_DIR}/testcases/features/copper.py
         ;;
         *)
             echo "The test case '${test_name}' does not exist."
             exit 1
     esac
+
+    if [[ $? != 0 ]]; then exit 1
+    else exit 0
+    fi
 }