Skip to content

Commit

Permalink
lib.sh: Workaround sof-test output alignment issue
Browse files Browse the repository at this point in the history
If sof-test test case is run manually and locally,
the output of sof-test is messy, the lines are not
aligned left at the beginning of each line, some
lines start in the middle of a line, which makes
the output log hard to follow.

This patch helps to workaround the above issue.

Link: thesofproject#1151

Signed-off-by: Chao Song <[email protected]>
  • Loading branch information
Chao Song committed Jan 19, 2024
1 parent 14c049b commit 8341638
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,10 @@ func_mtrace_collect()
local mtraceCmd=("$MTRACE")
dlogi "Starting ${mtraceCmd[*]} >& $clogfile &"
# Cleaned up by func_exit_handler() in hijack.sh
# The use of 'bash -c' is a workaround for below issue:
# https://github.com/thesofproject/sof-test/issues/1151
# shellcheck disable=SC2024
sudo "${mtraceCmd[@]}" >& "$clogfile" &
sudo bash -c "${mtraceCmd[*]} >& $clogfile &"
}

func_lib_log_post_process()
Expand Down

0 comments on commit 8341638

Please sign in to comment.