From 5bf316794fd7c11e087c45019c3fa40afde522ff Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 11 Nov 2015 14:36:27 -0800 Subject: [PATCH] Fix grab console log partial gets The grab console log script started by cleaning out any existing console log files with echo. Unfortunately echo appends a newline by default which meant we ended up with a 1 byte file instead of a 0 byte file. This resulted in grabbing the console log from byte offset 1 instead of 0 and jenkins is weird and prepended base64 content at the beginning of the log file in this case. Fix this by using echo -n to clear the file which results in a 0 byte file. Change-Id: I8bd7cbd0c19cd44067839b34e317248daad9f578 --- jenkins/scripts/grab_console_log.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jenkins/scripts/grab_console_log.sh b/jenkins/scripts/grab_console_log.sh index 9ddd4c8167..0640d9a91e 100755 --- a/jenkins/scripts/grab_console_log.sh +++ b/jenkins/scripts/grab_console_log.sh @@ -8,7 +8,8 @@ END_UUID=$(cat /proc/sys/kernel/random/uuid) echo "Grabbing consoleLog ($END_UUID)" # Since we are appending to fetched logs, clear any possibly old runs -echo > /tmp/console.html +# Don't add a newline so we end up with a 0 byte file. +echo -n > /tmp/console.html # Grab the HTML version of the log (includes timestamps) TRIES=0