diff options
author | Simon Glass | 2023-01-17 10:47:36 -0700 |
---|---|---|
committer | Tom Rini | 2023-01-23 18:11:40 -0500 |
commit | 8b031871218689e72ecf517ad6d584ae4c659aad (patch) | |
tree | 0c6c4b0a6541ded6edd8f6104a6cafe315b17010 /include/test | |
parent | ecdf3ab01f66585d0cb630b3ec28981dd4e7adff (diff) |
test: Add a generic function to skip delays
At present this feature is sandbox-specific. For running tests on boards,
we need a nop version. Add one.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/test.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/test/test.h b/include/test/test.h index beabe9333dc..752897cf06f 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -171,6 +171,22 @@ static inline int test_load_other_fdt(struct unit_test_state *uts) } /** + * Control skipping of time delays + * + * Some tests have unnecessay time delays (e.g. USB). Allow these to be + * skipped to speed up testing + * + * @param skip_delays true to skip delays from now on, false to honour delay + * requests + */ +static inline void test_set_skip_delays(bool skip_delays) +{ +#ifdef CONFIG_SANDBOX + state_set_skip_delays(skip_delays); +#endif +} + +/** * test_set_eth_enable() - Enable / disable Ethernet * * Allows control of whether Ethernet packets are actually send/received |