Add small checks to avoid possible 'No such file or directory' 29/2329/2
authorjose.lausuch <jose.lausuch@ericsson.com>
Thu, 8 Oct 2015 08:14:37 +0000 (10:14 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Thu, 8 Oct 2015 08:15:34 +0000 (10:15 +0200)
errors in the Docker automation procedure

JIRA: FUNCTEST-29

Change-Id: Ib8629d9c0f64a046cdbec27cb1bdced3e49c72bb
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
docker/start.sh

index bd2308c..60a21d1 100644 (file)
@@ -134,9 +134,13 @@ rally verify list
 echo "Functest: copy results and clean Functest environment"
 
 # save ODL results
-cp -Rf ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/logs ${FUNCTEST_RESULTS_DIR}/ODL
+odl_logs="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/logs"
+if [ -d ${tempest_conf} ]; then
+    cp -Rf  ${odl_logs} ${FUNCTEST_CONF_DIR}/ODL/
+fi
 
 # save tempest.conf for further troubleshooting
-cp $RALLY_VENV/tempest/for-deployment-*/tempest.conf ${FUNCTEST_CONF_DIR}
-
-
+tempest_conf="${RALLY_VENV}/tempest/for-deployment-*/tempest.conf"
+if [ -f ${tempest_conf} ]; then
+    cp $tempest_conf ${FUNCTEST_CONF_DIR}
+fi
\ No newline at end of file