[Concept,05/23] test: video: Provide an easy way to watch video tests

Message ID 20250915122905.1217249-6-sjg@u-boot.org
State New
Headers
Series expo: Support interactions with a mouse or touchpad |

Commit Message

Simon Glass Sept. 15, 2025, 12:28 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

The video tests run past too quickly to see what is going on. Update
them to introduce a delay after each check of the screen contents, when
LOG_DEBUG is enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 test/dm/video.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Patch

diff --git a/test/dm/video.c b/test/dm/video.c
index 8fc1a4d8b0d..513134dd445 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -17,6 +17,7 @@ 
 #include <asm/sdl.h>
 #include <dm/test.h>
 #include <dm/uclass-internal.h>
+#include <linux/delay.h>
 #include <test/lib.h>
 #include <test/test.h>
 #include <test/ut.h>
@@ -69,6 +70,10 @@  int video_compress_fb(struct unit_test_state *uts, struct udevice *dev,
 	if (ret)
 		return ret;
 
+	/* provide a useful delay if #define LOG_DEBUG at the top of file */
+	if (_DEBUG)
+		mdelay(300);
+
 	return destlen;
 }