]> git.sur5r.net Git - u-boot/commitdiff
dm: video: test: Add tests for rotated consoles
authorSimon Glass <sjg@chromium.org>
Tue, 19 Jan 2016 02:52:27 +0000 (19:52 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 21 Jan 2016 02:10:16 +0000 (19:10 -0700)
Test that text is displayed correctly when the console is rotated.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
configs/sandbox_defconfig
test/dm/video.c

index 898c5f47ac8ee2574baef08e630c15042eb9f4b9..09ced0184a7a20a833f352e27c773091981f0a76 100644 (file)
@@ -77,6 +77,7 @@ CONFIG_USB_STORAGE=y
 CONFIG_USB_KEYBOARD=y
 CONFIG_SYS_USB_EVENT_POLL=y
 CONFIG_DM_VIDEO=y
+CONFIG_VIDEO_ROTATION=y
 CONFIG_VIDEO_SANDBOX_SDL=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_TPM=y
index b197b01753d7526f62193477a9741db8fac51963..65db216b319dcf753e88246fd9c41764c29c40fe 100644 (file)
@@ -188,3 +188,30 @@ static int dm_test_video_context(struct unit_test_state *uts)
        return check_vidconsole_output(uts, 0, 788, 453);
 }
 DM_TEST(dm_test_video_context, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test rotated text output through the console uclass */
+static int dm_test_video_rotation1(struct unit_test_state *uts)
+{
+       ut_assertok(check_vidconsole_output(uts, 1, 1112, 680));
+
+       return 0;
+}
+DM_TEST(dm_test_video_rotation1, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test rotated text output through the console uclass */
+static int dm_test_video_rotation2(struct unit_test_state *uts)
+{
+       ut_assertok(check_vidconsole_output(uts, 2, 785, 446));
+
+       return 0;
+}
+DM_TEST(dm_test_video_rotation2, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Test rotated text output through the console uclass */
+static int dm_test_video_rotation3(struct unit_test_state *uts)
+{
+       ut_assertok(check_vidconsole_output(uts, 3, 1134, 681));
+
+       return 0;
+}
+DM_TEST(dm_test_video_rotation3, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);