diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-07 17:34:49 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-03-12 09:57:29 -0500 |
commit | 30a0d2064d593bf357282071a938816de876c64b (patch) | |
tree | 1ffba2c09c279767da8cbffcfa917069abe25654 /test/dm | |
parent | d002a2764418fa8f054d94789e7814f60294318f (diff) | |
download | u-boot-30a0d2064d593bf357282071a938816de876c64b.tar.gz u-boot-30a0d2064d593bf357282071a938816de876c64b.tar.xz u-boot-30a0d2064d593bf357282071a938816de876c64b.zip |
test: Call test_pre/post_run() from driver model tests
Ultimately we want to get rid of the special driver model test init and
use test_pre_run() and test_post_run() for all tests. As a first step,
use those function to handle console recording.
For now we need a special case for setting uts->start, but that wil go
away once all init is in one place.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm')
-rw-r--r-- | test/dm/test-dm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/dm/test-dm.c b/test/dm/test-dm.c index 71e9cf6e5d..69a0349d04 100644 --- a/test/dm/test-dm.c +++ b/test/dm/test-dm.c @@ -97,14 +97,14 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test, (test->flags & UT_TESTF_SCAN_FDT)) ut_assertok(dm_extended_scan(false)); - /* - * Silence the console and rely on console recording to get - * our output. - */ - console_record_reset_enable(); + ut_assertok(test_pre_run(uts, test)); + if (!state->show_test_output) gd->flags |= GD_FLG_SILENT; test->func(uts); + + ut_assertok(test_post_run(uts, test)); + gd->flags &= ~(GD_FLG_SILENT | GD_FLG_RECORD); state_set_skip_delays(false); |