linux/tools/testing/kunit
Daniel Latypov 6bd0f52ee8 kunit: tool: readability tweaks in KernelCI json generation logic
Use a more idiomatic check that a list is non-empty (`if mylist:`) and
simplify the function body by dedenting and using a dict to map between
the kunit TestStatus enum => KernelCI json status string.

The dict hopefully makes it less likely to have bugs like commit
9a6bb30a88 ("kunit: tool: fix --json output for skipped tests").

Signed-off-by: Daniel Latypov <dlatypov@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-04-04 15:22:15 -06:00
..
configs kunit: Remove the unused all_tests.config 2021-06-23 17:49:41 -06:00
qemu_configs kunit: tool: add support for QEMU 2021-06-11 16:10:23 -06:00
test_data kunit: tool: Report an error if any test has no subtests 2021-12-13 13:36:15 -07:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kunit_config.py kunit: tool: drop last uses of collections.namedtuple 2022-04-04 14:25:53 -06:00
kunit_json.py kunit: tool: readability tweaks in KernelCI json generation logic 2022-04-04 15:22:15 -06:00
kunit_kernel.py kunit: tool: simplify code since build_dir can't be None 2022-04-04 14:25:58 -06:00
kunit_parser.py kunit: tool: fix newly introduced typechecker errors 2021-12-15 16:44:49 -07:00
kunit_tool_test.py kunit: tool: simplify code since build_dir can't be None 2022-04-04 14:25:58 -06:00
kunit.py kunit: tool: drop unused KernelDirectoryPath var 2022-04-04 14:25:47 -06:00
qemu_config.py kunit: tool: drop last uses of collections.namedtuple 2022-04-04 14:25:53 -06:00
run_checks.py kunit: fix missing f in f-string in run_checks.py 2022-02-02 11:12:15 -07:00