From 3884c98c32cd5fb5b5b42185d5d0575659434bbf Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 8 Nov 2015 23:47:44 -0700 Subject: dm: usb: Avoid time delays in sandbox tests Currently the USB tests take around two seconds to run. Remove these unnecessary time delays so that the tests run quickly. Signed-off-by: Simon Glass --- test/dm/test-main.c | 2 ++ test/dm/usb.c | 3 +++ 2 files changed, 5 insertions(+) (limited to 'test/dm') diff --git a/test/dm/test-main.c b/test/dm/test-main.c index 0e43ab9..a36a9c0 100644 --- a/test/dm/test-main.c +++ b/test/dm/test-main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -113,6 +114,7 @@ static int dm_test_main(const char *test_name) ut_assertok(dm_scan_fdt(gd->fdt_blob, false)); test->func(uts); + state_set_skip_delays(false); ut_assertok(dm_test_destroy(uts)); } diff --git a/test/dm/usb.c b/test/dm/usb.c index 9939d83..4300bbd 100644 --- a/test/dm/usb.c +++ b/test/dm/usb.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include #include #include @@ -35,6 +37,7 @@ static int dm_test_usb_flash(struct unit_test_state *uts) block_dev_desc_t *dev_desc; char cmp[1024]; + state_set_skip_delays(true); ut_assertok(usb_init()); ut_assertok(uclass_get_device(UCLASS_MASS_STORAGE, 0, &dev)); ut_assertok(get_device("usb", "0", &dev_desc)); -- cgit v1.1