kunit: tool: allow generating test results in JSON
authorHeidi Fahim <heidifahim@google.com>
Tue, 11 Aug 2020 21:27:56 +0000 (14:27 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 31 Aug 2020 21:40:00 +0000 (15:40 -0600)
commit21a6d1780d5bbfca0ce9b8104ca6233502fcbf86
tree65f89084e2cfcd33e0012deb7ef195b655f4a2cd
parent5578d008d9e06bb531fb3e62dd17096d9fd9c853
kunit: tool: allow generating test results in JSON

Add a --json flag, which when specified generates JSON formatted test
results conforming to the KernelCI API test_group spec[1]. The user can
use the new flag to specify a filename to print the json formatted
results to.

Link[1]: https://api.kernelci.org/schema-test-group.html#post
Signed-off-by: Heidi Fahim <heidifahim@google.com>
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit.py
tools/testing/kunit/kunit_json.py [new file with mode: 0644]
tools/testing/kunit/kunit_tool_test.py