[PATCH 10/34] test: event: Only run test_event_probe() on sandbox

Simon Glass sjg at chromium.org
Mon Oct 2 03:15:20 CEST 2023


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 at chromium.org>
---

 test/common/event.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/common/event.c b/test/common/event.c
index c0912a3437bb..b462694fc3b6 100644
--- a/test/common/event.c
+++ b/test/common/event.c
@@ -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));
-- 
2.42.0.582.g8ccd20d70d-goog



More information about the U-Boot mailing list