Re: [PATCH 1/2] kunit: tool: move Kconfig read_from_file/parse_from_string to package-level

From: Brendan Higgins
Date: Tue Dec 07 2021 - 17:26:00 EST


On Fri, Nov 5, 2021 at 9:31 PM 'Daniel Latypov' via KUnit Development
<kunit-dev@xxxxxxxxxxxxxxxx> wrote:
>
> read_from_file() clears its `self` Kconfig object and parses a config
> file.
>
> It is a way to construct Kconfig objects more so than an operation on
> Kconfig objects. This is reflected in the fact its only ever used as:
> kconfig = kunit_config.Kconfig()
> kconfig.read_from_file(path)
>
> So clean this up and simplify callers by replacing it with
> kconfig = kunit_config.parse_file(path)
>
> Do the same thing for the related parse_from_string() function as well.
>
> Signed-off-by: Daniel Latypov <dlatypov@xxxxxxxxxx>

Reviewed-by: Brendan Higgins <brendanhiggins@xxxxxxxxxx>