summaryrefslogtreecommitdiff
path: root/.azure-pipelines.yml
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-12-14 13:36:41 -0500
committerTom Rini <trini@konsulko.com>2021-12-27 16:20:18 -0500
commitc1a7de57027de8fb0ba5097623157c1745a50496 (patch)
treec1c9310c6f76042e3e3be0d17beaa84cf19d81df /.azure-pipelines.yml
parent7e11f95b02c8c9088c4b470b6633ac521ef8fc03 (diff)
CI: Test for unmigrated CONFIG symbols in board config.h files
Now that all symbols that exist in Kconfig no longer also have boards setting them in the board config.h file, add a CI test to catch new instances of this, and fail. Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to '.azure-pipelines.yml')
-rw-r--r--.azure-pipelines.yml27
1 files changed, 27 insertions, 0 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 8801ff7d81..670bbc0e16 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -49,6 +49,33 @@ jobs:
-j$(sysctl -n hw.logicalcpu)
displayName: 'Perform tools-only build'
+ - job: check_for_migrated_symbols_in_board_header
+ displayName: 'Check for migrated symbols in board header'
+ pool:
+ vmImage: $(ubuntu_vm)
+ container:
+ image: $(ci_runner_image)
+ options: $(container_option)
+ steps:
+ - script: |
+ KSYMLST=`mktemp`
+ KUSEDLST=`mktemp`
+ cat `find . -name "Kconfig*"` | \
+ sed -n -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
+ -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' | \
+ sort -u > ${KUSEDLST} || true
+ NUM=`comm -12 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} | \
+ cut -d , -f 3`
+ if [[ $NUM -ne 0 ]]; then
+ echo "Unmigrated symbols found in $CFG"
+ exit 1
+ fi
+ done
+
- job: cppcheck
displayName: 'Static code analysis with cppcheck'
pool: