linux/tools/testing/kunit
Daniel Latypov 2b8fdbbf1c kunit: tool: move kunitconfig parsing into __init__, make it optional
LinuxSourceTree will unceremoniously crash if the user doesn't call
read_kunitconfig() first in a number of functions.

And currently every place we create an instance, the caller also calls
create_kunitconfig() and read_kunitconfig().
Move these instead into __init__() so they can't be forgotten and to
reduce copy-paste.

The https://github.com/google/pytype type-checker complained that
_config wasn't initialized. With this, kunit_tool now type checks
under both pytype and mypy.

Add an optional boolean that can be used to disable this for use cases
in the future where we might not need/want to load the config.

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Tested-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-01-15 17:52:12 -07:00
..
configs kunit: tool: fix --alltests flag 2020-09-23 15:52:11 -06:00
test_data kunit: tools: fix kunit_tool tests for parsing test plans 2020-10-26 13:25:40 -06:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kunit_config.py kunit: tool: surface and address more typing issues 2021-01-15 17:49:34 -07:00
kunit_json.py kunit: tool: surface and address more typing issues 2021-01-15 17:49:34 -07:00
kunit_kernel.py kunit: tool: move kunitconfig parsing into __init__, make it optional 2021-01-15 17:52:12 -07:00
kunit_parser.py kunit: tool: fix minor typing issue with None status 2021-01-15 17:51:47 -07:00
kunit_tool_test.py tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
kunit.py kunit: tool: move kunitconfig parsing into __init__, make it optional 2021-01-15 17:52:12 -07:00