diff options
author | David Stevens <stevensd@chromium.org> | 2022-01-29 12:03:26 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-30 00:44:40 +0000 |
commit | 854cd31b4d8ecd1061d7a12398a5fe768a8765b4 (patch) | |
tree | 34fd2bbea90705158f5e2ad1a3da778a5bf13310 /util/kconfig_check.py | |
parent | 7e4dd282f376e4da6d902e72286885ec13d3b738 (diff) | |
download | chrome-ec-854cd31b4d8ecd1061d7a12398a5fe768a8765b4.tar.gz |
Revert "Makefile: Switch to the Python script for CONFIG checking"
This reverts commit 5b4c6473a341ebbd88463c908b39bb2820e5c43b.
Reason for revert: b:216919905 - breaks chromeos CQ
Original change's description:
> Makefile: Switch to the Python script for CONFIG checking
>
> Now that the Python script seems to do what we need, switch over to
> use that for checking for allowed ad-hoc CONFIGs.
>
> Sadly we need a work-around for the very old Python 3 version used in
> the chroot.
>
> The new script is better at finding Kconfig options, so this allows some
> reductions in the config_allowed.txt file.
>
> Delete the now-unused shell scripts.
>
> BUG=b:181323955
> BRANCH=none
> TEST=python3 util/test_kconfig_check.py
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Change-Id: I2dafc9dfe9d9020638f4e49b5c5ee0fc0b10000b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2923233
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Bug: b:181323955
Change-Id: I9b5514f9d2df43033cfd95555612e2e89e6ce724
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426237
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Nicolas Norvez <norvez@chromium.org>
Tested-by: Nicolas Norvez <norvez@chromium.org>
Diffstat (limited to 'util/kconfig_check.py')
-rwxr-xr-x | util/kconfig_check.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/util/kconfig_check.py b/util/kconfig_check.py index 30a798b8f4..93f3afd53c 100755 --- a/util/kconfig_check.py +++ b/util/kconfig_check.py @@ -70,12 +70,7 @@ a corresponding Kconfig option for Zephyr''' parser.add_argument('-s', '--srctree', type=str, default='zephyr/', help='Path to source tree to look for Kconfigs') - # TODO(sjg@chromium.org): The chroot uses a very old Python. Once it moves - # to 3.7 or later we can use this instead: - # subparsers = parser.add_subparsers(dest='cmd', required=True) - subparsers = parser.add_subparsers(dest='cmd') - subparsers.required = True - + subparsers = parser.add_subparsers(dest='cmd', required=True) subparsers.add_parser('check', help='Check for new ad-hoc CONFIGs') return parser.parse_args(argv) @@ -274,14 +269,7 @@ class KconfigCheck: current state of the Kconfig options """ configs = self.read_configs(configs_file, use_defines) - try: - kconfigs = self.scan_kconfigs(srcdir, prefix, search_paths) - except kconfiglib.KconfigError: - # If we don't actually have access to the full Kconfig then we may - # get an error. Fall back to using manual methods. - kconfigs = self.scan_kconfigs(srcdir, prefix, search_paths, - try_kconfiglib=False) - + kconfigs = self.scan_kconfigs(srcdir, prefix, search_paths) allowed = self.read_allowed(allowed_file) new_adhoc = self.find_new_adhoc(configs, kconfigs, allowed) unneeded_adhoc = self.find_unneeded_adhoc(kconfigs, allowed) |