mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
test: Silenece the echo and print tests
These tests current produce unwanted output on sandbox. Use the correct functions to controller console output, to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e2734d647e
commit
b6da559764
2 changed files with 8 additions and 3 deletions
|
@ -18,12 +18,14 @@ DECLARE_GLOBAL_DATA_PTR;
|
|||
static int test_print_freq(struct unit_test_state *uts,
|
||||
uint64_t freq, char *expected)
|
||||
{
|
||||
ut_silence_console(uts);
|
||||
console_record_reset_enable();
|
||||
print_freq(freq, ";\n");
|
||||
gd->flags &= ~GD_FLG_RECORD;
|
||||
ut_unsilence_console(uts);
|
||||
console_record_readline(uts->actual_str, sizeof(uts->actual_str));
|
||||
ut_asserteq_str(expected, uts->actual_str);
|
||||
ut_assertok(ut_check_console_end(uts));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -46,12 +48,14 @@ LIB_TEST(lib_test_print_freq, 0);
|
|||
static int test_print_size(struct unit_test_state *uts,
|
||||
uint64_t freq, char *expected)
|
||||
{
|
||||
ut_silence_console(uts);
|
||||
console_record_reset_enable();
|
||||
print_size(freq, ";\n");
|
||||
gd->flags &= ~GD_FLG_RECORD;
|
||||
ut_unsilence_console(uts);
|
||||
console_record_readline(uts->actual_str, sizeof(uts->actual_str));
|
||||
ut_asserteq_str(expected, uts->actual_str);
|
||||
ut_assertok(ut_check_console_end(uts));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue