diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-15 18:11:13 +1300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-27 15:04:31 +1300 |
commit | b6da55976439c63e4f3037a65b0dde1656e7af6a (patch) | |
tree | 6b125c5eefa8415b7a7ee7c47ae4fee8e9f15696 /test/lib | |
parent | e2734d647e9c86f46083b29224fc7b41a46e1858 (diff) | |
download | u-boot-b6da55976439c63e4f3037a65b0dde1656e7af6a.tar.gz u-boot-b6da55976439c63e4f3037a65b0dde1656e7af6a.tar.bz2 u-boot-b6da55976439c63e4f3037a65b0dde1656e7af6a.zip |
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>
Diffstat (limited to 'test/lib')
-rw-r--r-- | test/lib/test_print.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/lib/test_print.c b/test/lib/test_print.c index 12972f1bcd..a60a5a51f1 100644 --- a/test/lib/test_print.c +++ b/test/lib/test_print.c @@ -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; } |