Add Azure DevOps pipelines for ThreadX test

This commit is contained in:
Tiejun Zhou
2023-04-11 07:36:09 +00:00
parent ebeb02b958
commit 5f430f22e2
6 changed files with 161 additions and 2 deletions

19
scripts/sdl_check.sh Executable file
View File

@@ -0,0 +1,19 @@
# !/bin/bash
dir_list="common common_smp common_modules ports ports_module ports_smp samples"
exclude_list="-path TX"
file_list=$(find $dir_list \( $exclude_list \) -prune -o -type f -name '*.[ch]' -print)
cd $(dirname `realpath $0`)/..
echo "Checking for unexpected usage of memcpy..."
echo ""
echo "Excluding:"
echo $exclude_list | grep -P "[^\s]*/[^\s]*" -o
echo ""
echo "Result:"
grep -i "memcpy(" -i $file_list -n | grep -i "use case of .* is verified" -v
if [ "$?" -eq "1" ];
then
echo "CLEAN"
exit 0
else
exit 1
fi