summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-03-07 17:34:55 -0700
committerTom Rini <trini@konsulko.com>2021-03-12 09:57:30 -0500
commit47ec3ede4efe214b4debdaf845d6eb622154f405 (patch)
tree04bebac4f5049500b744148a4dce8933c2a0053c /include
parent74524712873e72bad76de07be2401c10b694d25f (diff)
test: Move delay skipping to test_pre_run()
This allows delays to be skipped in sandbox tests. Move it to the common pre-init function. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/test/ut.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/test/ut.h b/include/test/ut.h
index 7cb5e10f3a..e5ec18e60b 100644
--- a/include/test/ut.h
+++ b/include/test/ut.h
@@ -357,6 +357,17 @@ void ut_silence_console(struct unit_test_state *uts);
void ut_unsilence_console(struct unit_test_state *uts);
/**
+ * ut_set_skip_delays() - Sets whether delays should be skipped
+ *
+ * Normally functions like mdelay() cause U-Boot to wait for a while. This
+ * allows all such delays to be skipped on sandbox, to speed up tests
+ *
+ * @uts: Test state (in case in future we want to keep state here)
+ * @skip_delays: true to skip delays, false to process them normally
+ */
+void ut_set_skip_delays(struct unit_test_state *uts, bool skip_delays);
+
+/**
* test_pre_run() - Handle any preparation needed to run a test
*
* @uts: Test state