File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ if [[ "${TPM2_TSS_VERSION}" == "master" && "$CC" != clang* ]];then
115115 git checkout HEAD test/integration/tests/getcap.sh
116116 #
117117 # symlink is an irrelevant test for 4.X branch
118+
119+ # The file tss2_tpm2_types.h was changed by clang-formt
120+ # through extracting the error messages would not work.
121+ git checkout HEAD test/integration/tests/rc_decode.sh
118122 #
119123 rm test/integration/tests/symlink.sh
120124
Original file line number Diff line number Diff line change 2424declare -A codes
2525
2626tss2_tpm2_types=' '
27+ tss2_tpm2_types2=tss2_tpm2_types.h
2728for dir in " $( pkg-config --variable includedir tss2-esys) " \
2829/usr/local/include /usr/include; do
2930 if [ -f " $dir /tss2/tss2_tpm2_types.h" ]; then
@@ -37,19 +38,22 @@ if [ -z "$tss2_tpm2_types" ]; then
3738 exit 1
3839fi
3940
41+ sed -z ' s/\\\n//g; s/ */ /g' $tss2_tpm2_types > $tss2_tpm2_types2
42+
4043# Populate the main TPM2_RC values
41- eval $( grep -Po " ^#define \K(TPM2_RC.*)" " $tss2_tpm2_types " \
44+ eval $( grep -Po " ^#define \K(TPM2_RC.*)" " $tss2_tpm2_types2 " \
4245 | grep -v ' +' \
4346 | sed " s%/*[^/]*/$%%g" \
4447 | sed " s%[[:space:]]*((TPM2_RC)[[:space:]]*%=%g" \
4548 | sed " s%)%%g" )
4649
4750# Generate the TPM2_RC array based on TSS2 header
48- varlist=" $( sed -rn " s%^#define (TPM2_RC_[^[:space:]]*)[[:space:]]*\(\(TPM2_RC\) \((TPM2_RC[^\)]*)[^/]*/\* ([^\*]*) \*/%\1=\$ \(\(\2\)\):\3%p" " $tss2_tpm2_types " ) "
51+ varlist=" $( sed -rn " s%^#define (TPM2_RC_[^[:space:]]*)[[:space:]]*\(\(TPM2_RC\)\((TPM2_RC[^\)]*)[^/]*/\* ([^\*]*) \*/%\1=\$ \(\(\2\)\):\3%p" " $tss2_tpm2_types2 " ) "
4952while IFS=' =' read key value; do
5053 codes[${key} ]=" ${value} "
5154done <<< " ${varlist}"
5255
56+ rm $tss2_tpm2_types2
5357fail=0
5458
5559for key in " ${! codes[@]} " ; do
You can’t perform that action at this time.
0 commit comments