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>
This commit is contained in:
Simon Glass
2020-11-08 21:08:43 -07:00
committed by Tom Rini
parent 12fc1f3bb2
commit ef7e264944
3 changed files with 40 additions and 9 deletions

View File

@@ -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