aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/kunit
diff options
context:
space:
mode:
authorDavid Gow <davidgow@google.com>2020-10-21 00:16:03 -0700
committerShuah Khan <skhan@linuxfoundation.org>2020-11-10 13:09:15 -0700
commit3959d0a63b3202ea2aa12b3f6effd5400d773d31 (patch)
tree387bc00a62e97a1df1ae51094f8da57d53f75685 /tools/testing/kunit
parentkunit: tool: unmark test_data as binary blobs (diff)
downloadwireguard-linux-3959d0a63b3202ea2aa12b3f6effd5400d773d31.tar.xz
wireguard-linux-3959d0a63b3202ea2aa12b3f6effd5400d773d31.zip
kunit: Fix kunit.py parse subcommand (use null build_dir)
When JSON support was added in [1], the KunitParseRequest tuple was updated to contain a 'build_dir' field, but kunit.py parse doesn't accept --build_dir as an option. The code nevertheless tried to access it, resulting in this error: AttributeError: 'Namespace' object has no attribute 'build_dir' Given that the parser only uses the build_dir variable to set the 'build_environment' json field, we set it to None (which gives the JSON 'null') for now. Ultimately, we probably do want to be able to set this, but since it's new functionality which (for the parse subcommand) never worked, this is the quickest way of getting it back up and running. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit-fixes&id=21a6d1780d5bbfca0ce9b8104ca6233502fcbf86 Fixes: 21a6d1780d5b ("kunit: tool: allow generating test results in JSON") Signed-off-by: David Gow <davidgow@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Tested-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit')
-rwxr-xr-xtools/testing/kunit/kunit.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py
index ebf5f5763dee..a6d5f219f714 100755
--- a/tools/testing/kunit/kunit.py
+++ b/tools/testing/kunit/kunit.py
@@ -337,7 +337,7 @@ def main(argv, linux=None):
kunit_output = f.read().splitlines()
request = KunitParseRequest(cli_args.raw_output,
kunit_output,
- cli_args.build_dir,
+ None,
cli_args.json)
result = parse_tests(request)
if result.status != KunitStatus.SUCCESS: