diff options
Diffstat (limited to 'test/test-main.c')
-rw-r--r-- | test/test-main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test-main.c b/test/test-main.c index ca6a073a8cb..7a1f74a2c84 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -4,6 +4,8 @@ * Written by Simon Glass <sjg@chromium.org> */ +#define LOG_CATEGORY LOGC_TEST + #include <blk.h> #include <console.h> #include <cyclic.h> @@ -386,6 +388,12 @@ static int test_pre_run(struct unit_test_state *uts, struct unit_test *test) return -EAGAIN; } } + if (test->flags & UFT_BLOBLIST) { + log_debug("save bloblist %p\n", gd_bloblist()); + uts->old_bloblist = gd_bloblist(); + gd_set_bloblist(NULL); + } + ut_silence_console(uts); return 0; @@ -409,6 +417,11 @@ static int test_post_run(struct unit_test_state *uts, struct unit_test *test) free(uts->of_other); uts->of_other = NULL; + if (test->flags & UFT_BLOBLIST) { + gd_set_bloblist(uts->old_bloblist); + log_debug("restore bloblist %p\n", gd_bloblist()); + } + blkcache_free(); return 0; |