From 1298877460b7b7df422c75289293476dee85740f Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Fri, 11 Feb 2022 12:56:36 -0800 Subject: [PATCH] Improve cirque flask log display when error happens (#14988) * Improve flash log display when error happens * Restyled by shfmt Co-authored-by: Restyled.io --- scripts/tests/cirque_tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/tests/cirque_tests.sh b/scripts/tests/cirque_tests.sh index 2a1062a4ec4f32..943bf158578269 100755 --- a/scripts/tests/cirque_tests.sh +++ b/scripts/tests/cirque_tests.sh @@ -62,6 +62,9 @@ function __cirquetest_start_flask() { function __cirquetest_clean_flask() { echo "Cleanup Flask pid $FLASK_PID" kill -SIGTERM -"$FLASK_PID" + mv "$LOG_DIR/$CURRENT_TEST"/flask.log "$LOG_DIR/$CURRENT_TEST"/flask.log.old + cat "$LOG_DIR/$CURRENT_TEST"/flask.log.old | sed 's/\\n/\n/g' | sed 's/\\t/ /g' >"$LOG_DIR/$CURRENT_TEST"/flask.log + rm "$LOG_DIR/$CURRENT_TEST"/flask.log.old } function __cirquetest_build_ot() {