From ce4c6a2473caaca26e9f9f7cd8712701a22bc342 Mon Sep 17 00:00:00 2001 From: Christophe Gosiau Date: Tue, 31 Oct 2017 15:14:01 +0100 Subject: [PATCH] Fix logs for video-recording The log files "video-rec-stderr.log" and "video-rec-stdout.log" seem to contain "^M" characters (carriage-return). The 'tail' command below doesn't take into account this character. It returns the complete output of the log files. Therefore it needs to be replaced into a proper newline. This problem is not visible if executed in bash because each line will overwrite the previous line. --- video-rec/bin/stop-video | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video-rec/bin/stop-video b/video-rec/bin/stop-video index 7125b547..0a6c8142 100755 --- a/video-rec/bin/stop-video +++ b/video-rec/bin/stop-video @@ -39,6 +39,9 @@ else die "Were unable to stop video recording within '${WAIT_TIME_OUT_VIDEO_STOP}'" fi +sed -i -e "s/\r/\n/g" ${LOGS_DIR}/video-rec-stderr.log || true +sed -i -e "s/\r/\n/g" ${LOGS_DIR}/video-rec-stdout.log || true + # Include videos log in the output log "-- DEBUG: video-rec-stdout.log ----" tail -n 40 ${LOGS_DIR}/video-rec-stdout.log || true