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 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 > > > --- > > > > > > 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