diff --git a/hack/test-config.sh b/hack/test-config.sh index 2f700e0e..a534998a 100644 --- a/hack/test-config.sh +++ b/hack/test-config.sh @@ -67,13 +67,14 @@ CLIENTIMAGE_AUTO_DELETE=${CLIENTIMAGE_AUTO_DELETE:-true} SIMIMAGE_AUTO_DELETE=${SIMIMAGE_AUTO_DELETE:-true} #log collection parameter -DIR_ROOT=${DIR_ROOT:-"~"} +DIR_ROOT=${DIR_ROOT:-"$HOME"} SIM_LOG_DIR=${SIM_LOG_DIR:-"${DIR_ROOT}/logs"} SERVER_LOG_DIR=${SERVER_LOG_DIR:-"${DIR_ROOT}/logs"} CLIENT_LOG_DIR=${CLIENT_LOG_DIR:-"${DIR_ROOT}/logs"} DES_LOG_DIR=${DES_LOG_DIR:-"${DIR_ROOT}/grs/logs/${SERVER_NUM}se${SIM_NUM}si${CLIENT_NUM}cl"} DES_LOG_INSTANCE=${DES_LOG_INSTANCE:-"sonyadev4"} DES_LOG_INSTANCE_ZONE=${DES_LOG_INSTANCE_ZONE:-"us-central1-a"} +LOCAL_LOG_ONLY=${LOCAL_LOG_ONLY:-false} #rune2e parameter diff --git a/hack/test-loganalysis.sh b/hack/test-loganalysis.sh index 8ef4339e..2bc118db 100755 --- a/hack/test-loganalysis.sh +++ b/hack/test-loganalysis.sh @@ -158,4 +158,4 @@ for name in $( ls | grep server);do done -echo "Please check generated csv report under ./csv/${csv_name}" \ No newline at end of file +echo "Please check generated csv report under ${DESTINATION}/csv/${csv_name}" \ No newline at end of file diff --git a/hack/test-logcollect.sh b/hack/test-logcollect.sh index bd066258..d94cfa48 100755 --- a/hack/test-logcollect.sh +++ b/hack/test-logcollect.sh @@ -116,10 +116,15 @@ if [ ${SIM_NUM} -gt 0 ]; then fi "${GRS_ROOT}/hack/test-loganalysis.sh" -echo "Copying logs to destination instance." -copy-logs "${DES_LOG_INSTANCE}" "${DES_LOG_INSTANCE_ZONE}" "${DESTINATION}" "${DES_LOG_DIR}" -echo "Removing local copy from ${DESTINATION}" -sudo rm -r "${DESTINATION}" +if [ "${LOCAL_LOG_ONLY}" == "true" ]; then + echo "All logs copied to local dev machine:${DESTINATION}" +else + echo "Copying logs to destination instance." + copy-logs "${DES_LOG_INSTANCE}" "${DES_LOG_INSTANCE_ZONE}" "${DESTINATION}" "${DES_LOG_DIR}" + echo "All logs copied to ${DES_LOG_INSTANCE}:${DESTINATION}" + echo "Removing local copy from ${DESTINATION}" + sudo rm -r "${DESTINATION}" +fi