]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
test: event: Only run test_event_probe() on sandbox
authorSimon Glass <sjg@chromium.org>
Mon, 2 Oct 2023 01:15:20 +0000 (19:15 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 13 Dec 2023 23:39:05 +0000 (18:39 -0500)
This needs test devices which are only present on sandbox. Add a check
for this and skip just this test if running on a real board.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/common/event.c

index c0912a3437bb00e4f40a040073161f1df58ba125..b462694fc3b6973f68ad430eca8a09d6515758d7 100644 (file)
@@ -92,6 +92,9 @@ static int test_event_probe(struct unit_test_state *uts)
        struct test_state state;
        struct udevice *dev;
 
+       if (!IS_ENABLED(SANDBOX))
+               return -EAGAIN;
+
        state.val = 0;
        ut_assertok(event_register("pre", EVT_DM_PRE_PROBE, h_probe, &state));
        ut_assertok(event_register("post", EVT_DM_POST_PROBE, h_probe, &state));