diff options
author | Simon Glass | 2020-01-27 08:49:55 -0700 |
---|---|---|
committer | Simon Glass | 2020-02-05 19:33:46 -0700 |
commit | cfccff8000cb3f5b8eaee9a12568bc14eadfae8e (patch) | |
tree | a0b9c8333266ab961e9ddb196324443baccf1779 | |
parent | b612312816ffe41a3a7616aa00394ffb248cf91e (diff) |
test: Enable console recording in tests
At present we reset the console buffer before each test but do not
actually set the recording flag. Without this, the output is not
recorded.
Update the code to set the flag before the test and clear it afterwards.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | test/dm/test-main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/dm/test-main.c b/test/dm/test-main.c index 72648162a91..d7dc8d1f915 100644 --- a/test/dm/test-main.c +++ b/test/dm/test-main.c @@ -97,11 +97,11 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, * Silence the console and rely on console recording to get * our output. */ - console_record_reset(); + console_record_reset_enable(); if (!state->show_test_output) gd->flags |= GD_FLG_SILENT; test->func(uts); - gd->flags &= ~GD_FLG_SILENT; + gd->flags &= ~(GD_FLG_SILENT | GD_FLG_RECORD); state_set_skip_delays(false); ut_assertok(dm_test_destroy(uts)); |