mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-23 20:24:26 +08:00
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>
This commit is contained in:
parent
e180c2b129
commit
132644f56e
@ -35,6 +35,7 @@ enum {
|
||||
UT_TESTF_SCAN_FDT = BIT(2), /* scan device tree */
|
||||
UT_TESTF_FLAT_TREE = BIT(3), /* test needs flat DT */
|
||||
UT_TESTF_LIVE_TREE = BIT(4), /* needs live device tree */
|
||||
UT_TESTF_CONSOLE_REC = BIT(5), /* needs console recording */
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user