diff options
author | Simon Glass <sjg@chromium.org> | 2020-07-28 19:41:13 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-07 22:31:32 -0400 |
commit | 132644f56ebb7399fb139d6b9c9e54ef0c218ea9 (patch) | |
tree | df8a2248a8443f6c02d8bf029d65f5b89c9197b0 /test/cmd_ut.c | |
parent | e180c2b129016baf21086eca73767844e7eff185 (diff) |
test: Add a flag for tests that need console recording
Allow tests that need console recording to be marked, so they can be
skipped if it is not available.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/cmd_ut.c')
-rw-r--r-- | test/cmd_ut.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/cmd_ut.c b/test/cmd_ut.c index cc9543c315..1963f3792c 100644 --- a/test/cmd_ut.c +++ b/test/cmd_ut.c @@ -6,6 +6,7 @@ #include <common.h> #include <command.h> +#include <console.h> #include <test/suites.h> #include <test/test.h> @@ -34,6 +35,15 @@ int cmd_ut_category(const char *name, const char *prefix, continue; printf("Test: %s\n", test->name); + if (test->flags & UT_TESTF_CONSOLE_REC) { + int ret = console_record_reset_enable(); + + if (ret) { + printf("Skipping: Console recording disabled\n"); + continue; + } + } + uts.start = mallinfo(); test->func(&uts); |