From patchwork Mon Jan 27 15:49:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 240308 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Mon, 27 Jan 2020 08:49:55 -0700 Subject: [PATCH 20/21] test: Enable console recording in tests In-Reply-To: <20200127154956.64368-1-sjg@chromium.org> References: <20200127154956.64368-1-sjg@chromium.org> Message-ID: <20200127084920.20.I0d843e524c54d3c7a29919c95929b1909b9eaa61@changeid> 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 --- test/dm/test-main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/dm/test-main.c b/test/dm/test-main.c index 72648162a9..d7dc8d1f91 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));