From 1d6bed6254ac819ef7b6deb653053024311ec5be Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 28 Oct 2015 18:09:47 -0700 Subject: Only create backtrace stamp if dir exists. If the build is aborted before the working directory is created, there's also an induced error message about inability to create a 'backtrace' file. But in that case, there is no subshells executing yet. Signed-off-by: Alexey Neyman --- scripts/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 86653465..91ec2171 100644 --- a/scripts/functions +++ b/scripts/functions @@ -14,7 +14,7 @@ CT_OnError() { # To avoid printing the backtace for each sub-shell # up to the top-level, just remember we've dumped it if [ ! -f "${CT_WORK_DIR}/backtrace" ]; then - touch "${CT_WORK_DIR}/backtrace" + [ -d "${CT_WORK_DIR}" ] && touch "${CT_WORK_DIR}/backtrace" # Print steps backtrace step_depth=${CT_STEP_COUNT} -- cgit v1.2.3 From b2f8afef8532247c60764fffc938898903c06a4c Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Thu, 29 Oct 2015 20:58:52 -0700 Subject: Interpret escape sequences in CT_DoLog. Otherwise, CT_Abort messages with \n are not displayed properly. Signed-off-by: Alexey Neyman --- scripts/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 91ec2171..2261b8d0 100644 --- a/scripts/functions +++ b/scripts/functions @@ -178,7 +178,7 @@ CT_DoLog() { if [ $# -eq 0 ]; then cat - else - printf "%s\n" "${*}" + echo -e "${*}" fi |( IFS="${CR}" # We want the full lines, even leading spaces _prog_bar_cpt=0 _prog_bar[0]='/' -- cgit v1.2.3