[PATCH 1/4] Makefile: Add a Python-based CONFIG checker
Tom Rini
trini at konsulko.com
Thu Sep 15 20:32:09 CEST 2022
On Wed, Sep 14, 2022 at 04:39:18PM -0600, Simon Glass wrote:
> Hi Tom,
>
> On Wed, 14 Sept 2022 at 12:47, Tom Rini <trini at konsulko.com> wrote:
> >
> > On Mon, Aug 29, 2022 at 07:57:04AM -0600, Simon Glass wrote:
> > > The existing shell script is a bit ugly. It was picked up by
> > > Chromium OS and then rewritten in Python, adding unit tests. Bring this
> > > new version into U-Boot.
> > >
> > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > ---
> > >
> > > scripts/kconfig_check.py | 338 ++++++++++++++++++++++++++++++++++
> > > scripts/test_kconfig_check.py | 185 +++++++++++++++++++
> > > 2 files changed, 523 insertions(+)
> > > create mode 100755 scripts/kconfig_check.py
> > > create mode 100755 scripts/test_kconfig_check.py
> >
> > All told, this ends up being +400 or so lines to replace a shell script
> > with Python. I'm not sure that's a win overall.
>
> It is more maintainable, has tests (which should not detract from line
> count) and uses kconfiglib. We could remove the non-kconfig code
> perhaps, but half the code is comments.
>
> Perhaps we are going to delete all this anyway soon, I'm not sure?
I don't know just how "soon", but yes, I'd rather not invest further
time in tooling that works and we're aiming to remove.
And as an aside, the current tool got me to learn comm which has been
quite handy in other things.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20220915/66054184/attachment.sig>
More information about the U-Boot
mailing list