2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-04 11:43:54 +08:00
linux-next/tools/testing/kunit
Daniel Latypov 1abdd39f14 kunit: tool: fix display of make errors
CalledProcessError stores the output of the failed process as `bytes`,
not a `str`.

So when we log it on build error, the make output is all crammed into
one line with "\n" instead of actually printing new lines.

After this change, we get readable output with new lines, e.g.
>   CC      lib/kunit/kunit-example-test.o
> In file included from ../lib/kunit/test.c:9:
> ../include/kunit/test.h:22:1: error: unknown type name ‘invalid_type_that_causes_compile’
>    22 | invalid_type_that_causes_compile errors;
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> make[3]: *** [../scripts/Makefile.build:283: lib/kunit/test.o] Error 1

Secondly, trying to concat exceptions to strings will fail with
> TypeError: can only concatenate str (not "OSError") to str
so fix this with an explicit cast to str.

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>
2020-10-09 14:04:09 -06:00
..
configs kunit: tool: fix --alltests flag 2020-09-23 15:52:11 -06:00
test_data kunit: show error if kunit results are not present 2020-06-26 14:29:10 -06:00
.gitattributes kunit: kunit_parser: make parser more robust 2020-03-20 16:15:57 -06:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
kunit_config.py kunit: kunit_config: Fix parsing of CONFIG options with space 2020-06-26 14:27:35 -06:00
kunit_json.py kunit: tool: allow generating test results in JSON 2020-08-31 15:40:00 -06:00
kunit_kernel.py kunit: tool: fix display of make errors 2020-10-09 14:04:09 -06:00
kunit_parser.py kunit: show error if kunit results are not present 2020-06-26 14:29:10 -06:00
kunit_tool_test.py kunit: tool: allow generating test results in JSON 2020-08-31 15:40:00 -06:00
kunit.py kunit: tool: handle when .kunit exists but .kunitconfig does not 2020-10-02 10:24:19 -06:00