• Daniel Latypov's avatar
    kunit: tool: make --raw_output=kunit (aka --raw_output) preserve leading spaces · a15cfa39
    Daniel Latypov authored
    With
    $ kunit.py run --raw_output=all ...
    you get the raw output from the kernel, e.g. something like
    > TAP version 14
    > 1..26
    >     # Subtest: time_test_cases
    >     1..1
    >     ok 1 - time64_to_tm_test_date_range
    > ok 1 - time_test_cases
    
    But --raw_output=kunit or equivalently --raw_output, you get
    > TAP version 14
    > 1..26
    > # Subtest: time_test_cases
    > 1..1
    > ok 1 - time64_to_tm_test_date_range
    > ok 1 - time_test_cases
    
    It looks less readable in my opinion, and it also isn't "raw output."
    
    This is due to sharing code with kunit_parser.py, which wants to strip
    leading whitespace since it uses anchored regexes.
    We could update the kunit_parser.py code to tolerate leaading spaces,
    but this patch takes the easier way out and adds a bool flag.
    Signed-off-by: default avatarDaniel Latypov <dlatypov@google.com>
    Reviewed-by: default avatarDavid Gow <davidgow@google.com>
    Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
    a15cfa39
kunit_parser.py 21.4 KB