Searched hist:"2 b8fdbbf1c616300312f71fe5b21fe8f03129950" (Results 1 – 2 of 2) sorted by relevance
/linux/tools/testing/kunit/ |
H A D | kunit_kernel.py | diff 2b8fdbbf1c616300312f71fe5b21fe8f03129950 Fri Jan 15 01:39:13 CET 2021 Daniel Latypov <dlatypov@google.com> 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>
|
H A D | kunit.py | diff 2b8fdbbf1c616300312f71fe5b21fe8f03129950 Fri Jan 15 01:39:13 CET 2021 Daniel Latypov <dlatypov@google.com> 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>
|