diff options
author | Simon Glass <sjg@chromium.org> | 2022-01-14 12:54:42 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-19 01:36:32 +0000 |
commit | f62cdb7feb9b23a1c716b9623ff7939041f0f25c (patch) | |
tree | 56139268b0e2e83c87e6e36dfbb5008df73d89c4 | |
parent | 9f5b54a28bcbdb7fba3dede077ea0edf0f71c7fe (diff) | |
download | chrome-ec-f62cdb7feb9b23a1c716b9623ff7939041f0f25c.tar.gz |
zephyr: Detect unsorted config_allowed
When the file is not sorted the check fails, but this is not obvious.
Add an explicit message.
BUG=b:195718112
BRANCH=none
TEST=make buildall -j32
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ib8b049d985c96567308d6240462a539cbf8b596a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388358
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rwxr-xr-x | util/check_allowed.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/util/check_allowed.sh b/util/check_allowed.sh index 0881409036..63425c2ef5 100755 --- a/util/check_allowed.sh +++ b/util/check_allowed.sh @@ -30,6 +30,11 @@ usage() { exit 1 } +die() { + echo >&2 "$1" + exit 2 +} + [ $# -ge 3 ] || usage config="$1" @@ -52,7 +57,8 @@ sed -n 's/^\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' "${config}" | sort | uniq \ >"${new_configs}" # Find any not mentioned in the allowed file -comm -23 "${new_configs}" "${allow}" > "${suspects}" +comm -23 --check-order "${new_configs}" "${allow}" > "${suspects}" || \ + die "${allow} must be sorted" # Find all the Kconfig options so far defined find "${srctree}" -type f -name "Kconfig*" -exec cat {} \; | sed -n -e \ |