summaryrefslogtreecommitdiffstats
path: root/tools/testing/kunit/kunit_parser.py
diff options
context:
space:
mode:
authorHeidi Fahim <heidifahim@google.com>2020-03-16 13:21:25 -0700
committerShuah Khan <skhan@linuxfoundation.org>2020-03-20 16:17:39 -0600
commit021ed9f551da33449a5238e45e849913422671d7 (patch)
tree082d59c441cadb738307558eda0697d73fc6d8f9 /tools/testing/kunit/kunit_parser.py
parentafc63da64f1e5e41875c98707020e85050f8a0c5 (diff)
kunit: Run all KUnit tests through allyesconfig
Implemented the functionality to run all KUnit tests through kunit_tool by specifying an --alltests flag, which builds UML with allyesconfig enabled, and consequently runs every KUnit test. A new function was added to kunit_kernel: make_allyesconfig. Firstly, if --alltests is specified, kunit.py triggers build_um_kernel which call make_allyesconfig. This function calls the make command, disables the broken configs that would otherwise prevent UML from building, then starts the kernel with all possible configurations enabled. All stdout and stderr is sent to test.log and read from there then fed through kunit_parser to parse the tests to the user. Also added a signal_handler in case kunit is interrupted while running. Tested: Run under different conditions such as testing with --raw_output, testing program interrupt then immediately running kunit again without --alltests and making sure to clean the console. Signed-off-by: Heidi Fahim <heidifahim@google.com> Reviewed-by: Brendan Higgins <brendanhiggins@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/kunit/kunit_parser.py')
-rw-r--r--tools/testing/kunit/kunit_parser.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/kunit/kunit_parser.py b/tools/testing/kunit/kunit_parser.py
index adf86747b07f..02815062d5a6 100644
--- a/tools/testing/kunit/kunit_parser.py
+++ b/tools/testing/kunit/kunit_parser.py
@@ -65,6 +65,7 @@ def isolate_kunit_output(kernel_output):
def raw_output(kernel_output):
for line in kernel_output:
print(line)
+ yield line
DIVIDER = '=' * 60