Merge "Stop calling exec_test.sh in the middle of python scripts"
[functest.git] / ci / exec_test.sh
index a6eeab4..20f7c2d 100755 (executable)
@@ -44,20 +44,18 @@ function odl_tests(){
     keystone_ip=$(openstack catalog show identity |grep publicURL| cut -f3 -d"/" | cut -f1 -d":")
     neutron_ip=$(openstack catalog show network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
     odl_ip=${neutron_ip}
-    odl_port=8181
+    odl_port=8080
     if [ "$INSTALLER_TYPE" == "fuel" ]; then
         odl_port=8282
     elif [ "$INSTALLER_TYPE" == "apex" ]; then
         odl_ip=$SDN_CONTROLLER_IP
+        odl_port=8181
     elif [ "$INSTALLER_TYPE" == "joid" ]; then
         odl_ip=$SDN_CONTROLLER
-        odl_port=8080
-        :
     elif [ "$INSTALLER_TYPE" == "compass" ]; then
-        :
+        odl_port=8181
     else
         odl_ip=$SDN_CONTROLLER_IP
-        odl_port=8080
     fi
 }
 
@@ -80,21 +78,17 @@ function run_test(){
         ;;
         "odl")
             odl_tests
-            ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/OpenDaylightTesting.py \
-                --keystoneip $keystone_ip --neutronip $neutron_ip \
-                --osusername ${OS_USERNAME} --ostenantname ${OS_TENANT_NAME} \
-                --ospassword ${OS_PASSWORD} \
-                --odlip $odl_ip --odlwebport $odl_port
-
-            # push results to the DB in case of CI
             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/"
-                odl_path="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/"
-                python ${odl_path}/odlreport2db.py -x ${odl_logs}/output.xml
+                args=-p
             fi
+            ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/OpenDaylightTesting.py \
+                --keystoneip $keystone_ip --neutronip $neutron_ip \
+                --osusername ${OS_USERNAME} --ostenantname ${OS_TENANT_NAME} \
+                --ospassword ${OS_PASSWORD} \
+                --odlip $odl_ip --odlwebport $odl_port ${args}
         ;;
         "tempest_smoke_serial")
             python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \