diff options
author | Daniel Latypov <dlatypov@google.com> | 2021-12-14 20:30:10 +0100 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2021-12-15 19:51:16 +0100 |
commit | 1ee2ba89bea86d6389509e426583b49ac19b86f2 (patch) | |
tree | 17a84cdbc71ae7707f25eaeae94af71bbe8f332d /tools/testing/kunit/kunit_tool_test.py | |
parent | kunit: tool: delete kunit_parser.TestResult type (diff) | |
download | linux-1ee2ba89bea86d6389509e426583b49ac19b86f2.tar.xz linux-1ee2ba89bea86d6389509e426583b49ac19b86f2.zip |
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>
Diffstat (limited to 'tools/testing/kunit/kunit_tool_test.py')
-rwxr-xr-x | tools/testing/kunit/kunit_tool_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/kunit/kunit_tool_test.py b/tools/testing/kunit/kunit_tool_test.py index 1f6b177ca5c2..b80e333a20cb 100755 --- a/tools/testing/kunit/kunit_tool_test.py +++ b/tools/testing/kunit/kunit_tool_test.py @@ -526,7 +526,7 @@ class KUnitMainTest(unittest.TestCase): def test_build_passes_args_pass(self): kunit.main(['build'], self.linux_source_mock) - self.assertEqual(self.linux_source_mock.build_reconfig.call_count, 0) + self.assertEqual(self.linux_source_mock.build_reconfig.call_count, 1) self.linux_source_mock.build_kernel.assert_called_once_with(False, 8, '.kunit', None) self.assertEqual(self.linux_source_mock.run_kernel.call_count, 0) |