Commit 2f925b47 authored by Henrik Brix Andersen's avatar Henrik Brix Andersen Committed by Fabio Baltieri
Browse files

tests: drivers: can: shell: poll for the dummy shell to be ready



Poll for the dummy shell to become ready and fail the tests if not.

Signed-off-by: default avatarHenrik Brix Andersen <henrik@brixandersen.dk>
parent d785c01b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -580,8 +580,12 @@ static void can_shell_before(void *fixture)

static void *can_shell_setup(void)
{
	/* Let the shell backend initialize. */
	k_msleep(20);
	const struct shell *sh = shell_backend_dummy_get_ptr();

	/* Wait for the initialization of the shell dummy backend. */
	WAIT_FOR(shell_ready(sh), 20000, k_msleep(1));
	zassert_true(shell_ready(sh), "timed out waiting for dummy shell backend");

	return NULL;
}