diff options
author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2023-05-17 13:18:16 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-05-26 08:44:09 -0600 |
commit | b1eaa8b2a55c9d5d22f5d2929f4d9973d6392241 (patch) | |
tree | a39a40abf47df5580b78ceba35f6b520f18967a7 /include/kunit | |
parent | b08f75b9bb0196a626a804e76970733f0a05de94 (diff) |
kunit: Update kunit_print_ok_not_ok function
There is no need use opaque test_or_suite pointer and is_test flag
as we don't use anything from the suite struct. Always expect test
pointer and use NULL as indication that provided results are from
the suite so we can treat them differently.
Since results could be from nested tests, like parameterized tests,
add explicit level parameter to properly indent output messages and
thus allow to reuse this function from other places.
While around, remove small code duplication near skip directive.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: David Gow <davidgow@google.com>
Cc: Rae Moar <rmoar@google.com>
Reviewed-by: David Gow <davidgow@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'include/kunit')
-rw-r--r-- | include/kunit/test.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/kunit/test.h b/include/kunit/test.h index 2f23d6efa505..8718bd21e61e 100644 --- a/include/kunit/test.h +++ b/include/kunit/test.h @@ -47,6 +47,7 @@ struct kunit; * sub-subtest. See the "Subtests" section in * https://node-tap.org/tap-protocol/ */ +#define KUNIT_INDENT_LEN 4 #define KUNIT_SUBTEST_INDENT " " #define KUNIT_SUBSUBTEST_INDENT " " |