Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions test-case/verify-sof-firmware-load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,26 @@
##

# source from the relative path of current folder
source $(dirname ${BASH_SOURCE[0]})/../case-lib/lib.sh
# shellcheck source=case-lib/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")/../case-lib/lib.sh"

func_opt_parse_option "$@"

if [ ! "$(alias |grep 'Sub-Test')" ];then
if alias |grep -q 'Sub-Test' ;then
cmd="dmesg"
else
# hijack DMESG_LOG_START_LINE which refer dump kernel log in exit function
DMESG_LOG_START_LINE=$(sof-get-kernel-line.sh|tail -n 1 |awk '{print $1;}')
cmd="sof-kernel-dump.sh"
else
cmd="dmesg"
fi

dlogi "Checking SOF Firmware load info in kernel log"
if [[ $(eval $cmd | grep "] sof-audio.*version") ]]; then
$cmd | grep -q "sof-audio.*Firmware.*version" && {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to stand out as a separate commit, otherwise it's too easy to assume this is just a shellcheck cleanup like the rest of the commit.

# dump the version info and ABI info
eval $cmd | grep "Firmware info" -A1
$cmd | grep "Firmware info" -A1
# dump the debug info
eval $cmd | grep "Firmware debug build" -A3
$cmd | grep "Firmware debug build" -A3
exit 0
else
die "Cannot find the sof audio version"
fi
}

die "Cannot find the sof audio version"