-
Notifications
You must be signed in to change notification settings - Fork 59
Enable cavstool #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable cavstool #897
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -293,6 +293,25 @@ find_ldc_file() | |||||
| printf '%s' "$ldcFile" | ||||||
| } | ||||||
|
|
||||||
| func_cavstool_etrace_collect() | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a comment / header documenting important control flow expectations
|
||||||
| { | ||||||
| local clogopt="--log-only --verbose" | ||||||
| local clogfile=$LOG_ROOT/etrace.txt | ||||||
|
|
||||||
| if [ -z "$CAVSTOOL" ]; then | ||||||
| CAVSTOOL=$(command -v cavstool.py) || { | ||||||
| dlogw 'No cavstool.py found in PATH' | ||||||
| return 1 | ||||||
| } | ||||||
| fi | ||||||
|
|
||||||
| local cavstoolCmd=("$CAVSTOOL" "$clogopt") | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Otherwise this tries to load a firmware file named I just wasted a couple of hours on this... already asked to inline this pointless variable before (when it was a single option and working)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I realize only I see this because I disable the sof-test Should still be fixed.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please help review and merge this |
||||||
| dlogi "Starting ${cavstoolCmd[*]}" | ||||||
| # Cleaned up by func_exit_handler() in hijack.sh | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The cleanup should be in the same commit as this comment. |
||||||
| # shellcheck disable=SC2024 | ||||||
| sudo "${cavstoolCmd[@]}" >& "$clogfile" & | ||||||
| } | ||||||
|
|
||||||
| SOF_LOG_COLLECT=0 | ||||||
| # This function starts a logger in the background using '&' | ||||||
| # | ||||||
|
|
@@ -334,7 +353,18 @@ func_lib_start_log_collect() | |||||
|
|
||||||
| if [ "X$is_etrace" == "X0" ];then | ||||||
| logfile=$LOG_ROOT/slogger.txt | ||||||
|
|
||||||
| # start cavstool in the background to collect the etrace. | ||||||
| # Since cavstool can follow a ring buffer in etrace, so it should be | ||||||
| # started at the start of the test and we would not miss any Zephyr logs. | ||||||
| # FIXME (new) sof SOF bug #6039 | ||||||
| is_zephyr && func_cavstool_etrace_collect | ||||||
| else | ||||||
| # cavstool starts at the beginning of the test, we don't need to start | ||||||
| # it again. We only need to start sof-logger to collect the etrace logs | ||||||
| # only for the non-zephyr platforms at the end of a test. | ||||||
| is_zephyr && return 0 | ||||||
|
|
||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||||||
| logfile=$LOG_ROOT/etrace.txt | ||||||
| logopt="" | ||||||
| fi | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.