[PATCH 2/7] CI: Update unmigrated symbol check

Tom Rini trini at konsulko.com
Tue Mar 22 02:33:28 CET 2022


We need to check for config header files that #undef migrated symbols as
well.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 .azure-pipelines.yml | 6 ++++--
 .gitlab-ci.yml       | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 0f1a1bd86326..cf6d28cf050f 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -68,8 +68,10 @@ stages:
              -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
              | sort -u > $KSYMLST
           for CFG in `find include/configs -name "*.h"`; do
-             grep '#define[[:blank:]]CONFIG_' $CFG | \
-                sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' | \
+             (grep '#define[[:blank:]]CONFIG_' $CFG | \
+                sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' ; \
+                grep '#undef[[:blank:]]CONFIG_' $CFG | \
+                sed -n 's/#undef.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p') | \
                 sort -u > ${KUSEDLST} || true
              NUM=`comm -123 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} | \
                 cut -d , -f 3`
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 388e666ec9e3..a5a5d78a86fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -129,8 +129,10 @@ check for migrated symbols in board header:
          -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p'
          | sort -u > $KSYMLST;
       for CFG in `find include/configs -name "*.h"`; do
-         grep '#define[[:blank:]]CONFIG_' $CFG |
-            sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' |
+         (grep '#define[[:blank:]]CONFIG_' $CFG |
+            sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' ;
+            grep '#undef[[:blank:]]CONFIG_' $CFG |
+            sed -n 's/#undef.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p') |
             sort -u > ${KUSEDLST} || true;
          NUM=`comm -123 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} |
             cut -d , -f 3`;
-- 
2.25.1



More information about the U-Boot mailing list