- - script: |
- KSYMLST=`mktemp`
- KUSEDLST=`mktemp`
- RET=0
- 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' ; \
- 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`
- if [[ $NUM -ne 0 ]]; then
- echo "Unmigrated symbols found in $CFG:"
- comm -12 ${KSYMLST} ${KUSEDLST}
- RET=1
- fi
- done
- exit $RET
+ # If grep succeeds and finds a match the test fails as we should
+ # have no matches.
+ - script: git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_'
+ :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h
+ :^include/linux/kconfig.h :^tools/ && exit 1 || exit 0