summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-11-09 07:08:43 +0300
committerTom Rini <trini@konsulko.com>2021-01-16 22:49:09 +0300
commitef7e264944a21c0a78378bf4d28db5bcacbc5b45 (patch)
tree654fc9a85ca17cc9bed616f68f09ab016799bd5a /include/test
parent12fc1f3bb2237c6eee7bc775599c14df5c997534 (diff)
downloadu-boot-ef7e264944a21c0a78378bf4d28db5bcacbc5b45.tar.xz
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.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/test/ut.h b/include/test/ut.h
index 3f2ee7514b..17400c73ea 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