Skip to content

Commit

Permalink
Improve cirque flask log display when error happens (#14988)
Browse files Browse the repository at this point in the history
* Improve flash log display when error happens

* Restyled by shfmt

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
yunhanw-google and restyled-commits authored Feb 11, 2022
1 parent d344a98 commit c899d1f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/tests/cirque_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c899d1f

Please sign in to comment.