kunit: tool: make `build` subcommand also reconfigure if needed
authorDaniel Latypov <dlatypov@google.com>
Tue, 14 Dec 2021 19:30:10 +0000 (11:30 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 15 Dec 2021 18:51:16 +0000 (11:51 -0700)
commit1ee2ba89bea86d6389509e426583b49ac19b86f2
tree17a84cdbc71ae7707f25eaeae94af71bbe8f332d
parente0cc8c052a3992b01f51df1d51eaae49e5b2710f
kunit: tool: make `build` subcommand also reconfigure if needed

If I created a kunitconfig file that was incomplete, then
$ ./tools/testing/kunit/kunit.py build --kunitconfig=my_kunitconfig
would silently drop all the options with unmet dependencies!

This is because it doesn't do the config check that `kunit.py config`
does.

So if I want to safely build a kernel for testing, I have to do
$ ./tools/testing/kunit/kunit.py config <flags>
$ ./tools/testing/kunit/kunit.py build <flags, again>

It seems unlikely that any user of kunit.py would want the current
`build` semantics.
So make it effectively do `kunit.py config` + `kunit.py build`.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit.py
tools/testing/kunit/kunit_tool_test.py