-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathverify-tplg-binary.sh
More file actions
executable file
·55 lines (43 loc) · 1.4 KB
/
verify-tplg-binary.sh
File metadata and controls
executable file
·55 lines (43 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
##
## Case Name: verify-tplg-binary
## Preconditions:
## SOF topology files install at "/lib/firmware/intel/sof-tplg"
## Description:
## check target topology files md5sum
## Case step:
## 1. check if topology files exist
## 2. dump tplg files md5sum
## Expect result:
## list topology files md5sum
##
set -e
# source from the relative path of current folder
# shellcheck source=case-lib/lib.sh
source "$(dirname "${BASH_SOURCE[0]}")"/../case-lib/lib.sh
OPT_NAME['t']='tplg' OPT_DESC['t']="tplg file, default value is env TPLG: $TPLG"
OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG"
func_opt_parse_option "$@"
tplg=${OPT_VAL['t']}
start_test
tplg_path=$(func_lib_get_tplg_path "$tplg") ||
die "No available topology ($tplg) for this test case"
dlogi "Checking topology file: $tplg_path with sof-tplgreader.py"
dlogi "Found file: $(md5sum "$tplg_path" | awk '{print $2, $1;}')"
tplgData=$(sof-tplgreader.py "$tplg_path") ||
die "No valid pipeline(s) found in $tplg_path"
dlogi "Valid pipeline(s) in this topology:"
echo "===========================>>"
echo "$tplgData"
echo "<<==========================="
main()
{
# This one can find more problems, see sof-test#1054
dlogi "Checking topology file with tplgtool2.py: $tplg_path"
( set -x
tplgtool2.py -D "${LOG_ROOT}" "$tplg_path" ) || {
ret=$?
die "tplgtool2.py returned $ret"
}
}
main