From 39bfe2033738e581ed080487cb32fbfd201015ca Mon Sep 17 00:00:00 2001 From: Joseph Chen Date: Fri, 16 Sep 2022 02:36:37 +0000 Subject: [PATCH] scripts: checkpatch: Add binary build commit check Signed-off-by: Joseph Chen Change-Id: Ic48078b3ee72fb3f71551b33dcf7f4be25abbe6f --- scripts/checkpatch.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.sh b/scripts/checkpatch.sh index 5f737266..13f809ff 100755 --- a/scripts/checkpatch.sh +++ b/scripts/checkpatch.sh @@ -52,6 +52,16 @@ function check_doc() echo "ERROR: ${DOC}: '${CMT}' is not match in commit message" exit 1 fi + + if ! echo ${FILE} | grep -q { ; then + if echo ${FILE} | grep -Eq 'spl_|tpl_|bl31_|bl32_|tee_' ; then + FILE_PATH=`find -name ${FILE}` + if ! strings ${FILE_PATH} | grep -q ${CMT} ; then + echo "ERROR: ${DOC}: ${FILE} is not build from '${CMT}'" + exit 1 + fi + fi + fi done # check severity @@ -105,7 +115,7 @@ function check_doc() function check_docs() { - if git log -1 --name-only | grep -Eq '.bin|.elf' ; then + if git log -1 --name-only | grep -Eq '\.bin|\.elf' ; then DOC_CN=`git log -1 --name-only | sed -n "/_CN\.md/p"` DOC_EN=`git log -1 --name-only | sed -n "/_EN\.md/p"` if [ -z "${DOC_CN}" -o -z "${DOC_EN}" ]; then