Push results if INSTALLER_TYPE and NODE_NAME are defined 53/14653/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 25 May 2016 09:22:31 +0000 (11:22 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 25 May 2016 13:54:08 +0000 (15:54 +0200)
INSTALLER_TYPE and NODE_NAME are also checked before pushing ODL
results in DB

Change-Id: If92c8b50d3ae7618475aeb25ab732c6dddb08019
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
ci/exec_test.sh

index 0bb8389..48f2894 100755 (executable)
@@ -83,7 +83,9 @@ 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" ]]; then
+            if [[ -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"
                 odl_path="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/"
                 node_name=$(env | grep NODE_NAME | cut -f2 -d'=')