Skip to content

Commit 005401e

Browse files
authored
Merge pull request #8 from NirSonnenschein/fix_check-names.sh
modify check-names.sh and list-macros.sh to work with PSA constants
2 parents d6292ca + 6bd1426 commit 005401e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/scripts/check-names.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ diff macros identifiers | sed -n -e 's/< //p' > actual-macros
4040
for THING in actual-macros enum-consts; do
4141
printf "Names of $THING: "
4242
test -r $THING
43-
BAD=$( grep -v '^MBEDTLS_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
43+
BAD=$( grep -E -v '^(MBEDTLS|PSA)_[0-9A-Z_]*[0-9A-Z]$' $THING || true )
4444
if [ "x$BAD" = "x" ]; then
4545
echo "PASS"
4646
else
@@ -65,7 +65,7 @@ done
6565

6666
printf "Likely typos: "
6767
sort -u actual-macros enum-consts > _caps
68-
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
68+
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
6969
NL='
7070
'
7171
sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \

tests/scripts/list-macros.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ if [ -d include/mbedtls ]; then :; else
77
exit 1
88
fi
99

10-
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1\.3\.h' )
10+
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
1111

1212
sed -n -e 's/.*#define \([a-zA-Z0-9_]*\).*/\1/p' $HEADERS \
1313
| egrep -v '^(asm|inline|EMIT|_CRT_SECURE_NO_DEPRECATE)$|^MULADDC_' \

0 commit comments

Comments
 (0)