aboutsummaryrefslogtreecommitdiff
path: root/test/common
diff options
context:
space:
mode:
authorSimon Glass2023-10-01 19:15:20 -0600
committerTom Rini2023-12-13 18:39:05 -0500
commit14f0cc49dfede009645b6b897463afa3385b45b8 (patch)
tree7d4c762044c65d1bd192985d99dd1ab5b0ce70df /test/common
parent078c6e2f8adab6e60227c15b25c85d633778092a (diff)
test: event: Only run test_event_probe() on sandbox
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>
Diffstat (limited to 'test/common')
-rw-r--r--test/common/event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/common/event.c b/test/common/event.c
index c0912a3437b..b462694fc3b 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));