diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-08 21:08:43 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-16 14:49:09 -0500 |
commit | ef7e264944a21c0a78378bf4d28db5bcacbc5b45 (patch) | |
tree | 654fc9a85ca17cc9bed616f68f09ab016799bd5a /include/test | |
parent | 12fc1f3bb2237c6eee7bc775599c14df5c997534 (diff) | |
download | u-boot-ef7e264944a21c0a78378bf4d28db5bcacbc5b45.zip u-boot-ef7e264944a21c0a78378bf4d28db5bcacbc5b45.tar.gz u-boot-ef7e264944a21c0a78378bf4d28db5bcacbc5b45.tar.bz2 |
test: Avoid assuming sandbox board for bloblist test
This tests assumes it is running on sandbox. Add a few functions to handle
silencing the console on any board and use those instead.
Reported-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/ut.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/test/ut.h b/include/test/ut.h index 3f2ee75..17400c7 100644 --- a/include/test/ut.h +++ b/include/test/ut.h @@ -338,4 +338,22 @@ ulong ut_check_free(void); */ long ut_check_delta(ulong last); +/** + * ut_silence_console() - Silence the console if requested by the user + * + * This stops test output from appear on the console. It is the default on + * sandbox, unless the -v flag is given. For other boards, this does nothing. + * + * @uts: Test state (in case in future we want to keep state here) + */ +void ut_silence_console(struct unit_test_state *uts); + +/** + * ut_unsilence_console() - Unsilence the console after a test + * + * This restarts console output again and turns off console recording. This + * happens on all boards, including sandbox. + */ +void ut_unsilence_console(struct unit_test_state *uts); + #endif |