aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Brodsky <kevin.brodsky@linaro.org>2021-03-24 18:31:04 +0000
committerKevin Brodsky <kevin.brodsky@linaro.org>2021-08-04 10:39:00 +0100
commitdfb5c3dacba0bbfc20c6e7cb8cc725310675e92b (patch)
treed7596223fe320083cbf9d7c9cfdd38697e65bc5b
parent891fc5ba58dd16da898f4d7b304c4e1935356af9 (diff)
downloadart-build-scripts-dfb5c3dacba0bbfc20c6e7cb8cc725310675e92b.tar.gz
Remove *mirror_output* functions
This is a partial revert of 7d80bb63583f ("ART: Add '--rerun-failed-tests' option"). There is no user of the *mirror_output* functions since 293eacffcdb9 ("Refactoring functions in test_art_target.sh"). Since these functions introduce unnecessary complications in start_logging, let's remove them. Change-Id: Id167bd59da69539524131fe9ae6b340561336165
-rw-r--r--utils/utils.sh28
1 files changed, 1 insertions, 27 deletions
diff --git a/utils/utils.sh b/utils/utils.sh
index 2e2d0d79..8a401a22 100644
--- a/utils/utils.sh
+++ b/utils/utils.sh
@@ -34,11 +34,6 @@ green=
yellow=
blue=
-# Currently all output is appended to a log file if it exists.
-# Users can want to have only the new output.
-# This is the name of a file, which the new output is mirrored to.
-log_file_output_copy=""
-
info() { echo -e "${blue}INFO: $* ${no_colour}" >&"${info_log}"; }
success() { echo -e "${green}SUCCESS: $* ${no_colour}" >&"${success_log}"; }
warning() { echo -e "${yellow}WARNING: $* ${no_colour}" >&"${warning_log}"; }
@@ -433,23 +428,6 @@ exists() {
fi
}
-# Arguments:
-# ${1} - a file name
-clear_file() {
- safe cat /dev/null > "$1"
-}
-
-# Specify the name of the file which output is mirrored to.
-# Arguments:
-# ${1} - a file name
-mirror_output_to_file() {
- log_file_output_copy="$1"
-}
-
-stop_mirror_output() {
- log_file_output_copy=""
-}
-
current_log_file=""
# Start logging all standard output and error onto a file.
@@ -469,11 +447,7 @@ start_logging() {
# Standard output is directed to a subprocess, tee, which sends the output
# to both a file and the original stdout.
- tee_cmd="safe tee -i -a $1"
- if [[ -n "${log_file_output_copy}" ]]; then
- tee_cmd+=" ${log_file_output_copy}"
- fi
- exec > >(${tee_cmd})
+ exec > >(safe tee -i -a "$1")
# Same for standard error.
exec 2>&1
}