diff options
| author | Tiejun Zhou <[email protected]> | 2023-04-11 07:36:09 +0000 |
|---|---|---|
| committer | Tiejun Zhou <[email protected]> | 2023-04-12 09:40:17 +0000 |
| commit | 5f430f22e2c00f2c079c91f48c9e2a0fc0bbbf47 (patch) | |
| tree | f5d38d89810821bcf049803fd5150b823fd8c664 /scripts/sdl_check.sh | |
| parent | ebeb02b95828ca100c3f24de5f9603a41049f8ff (diff) | |
Add Azure DevOps pipelines for ThreadX test
Diffstat (limited to 'scripts/sdl_check.sh')
| -rwxr-xr-x | scripts/sdl_check.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/sdl_check.sh b/scripts/sdl_check.sh new file mode 100755 index 00000000..77eeb5ce --- /dev/null +++ b/scripts/sdl_check.sh @@ -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
\ No newline at end of file |
