refactor(ci): record the console to a file even on single threaded runs
It's nice to always be able to open the console.log file of a job,
regardless of how it was run. Currently that file is only saved when
running in parallel. Do it serially too.
Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I5b246bae34edb0399875b6689001f5e06c54a49d
diff --git a/script/run_local_ci.sh b/script/run_local_ci.sh
index d50348c..714b86e 100755
--- a/script/run_local_ci.sh
+++ b/script/run_local_ci.sh
@@ -111,13 +111,13 @@
# messages but also any debugging prints. This is the default and it
# gets redirected to a file per job for archiving and disambiguation
# when running in parallel.
+ console_file="$workspace/console.log"
if [ "$parallel" -gt 1 ]; then
- console_file="$workspace/console.log"
exec >> $console_file 2>&1
else
# when running in serial, no scrambling is possible so print to
# stdout
- exec >&5 2>&1
+ exec > >(tee $console_file >&5) 2>&1
fi
# Unset make flags for build script