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
2 people authored and pull[bot] committed Jul 25, 2023
1 parent e086651 commit 1011022
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 1011022

Please sign in to comment.