diff mbox series

[09/34] test: font: Add dependencies on fonts

Message ID 20231002011553.463514-10-sjg@chromium.org
State Accepted
Commit 078c6e2f8adab6e60227c15b25c85d633778092a
Delegated to: Simon Glass
Headers show
Series x86: expo: Add support for editing coreboot CMOS RAM settings | expand

Commit Message

Simon Glass Oct. 2, 2023, 1:15 a.m. UTC
The font test needs two fonts. If one is not available, skip out early,
to avoid an error.

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

 test/cmd/font.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Simon Glass Dec. 13, 2023, 8:39 p.m. UTC | #1
The font test needs two fonts. If one is not available, skip out early,
to avoid an error.

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

 test/cmd/font.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/test/cmd/font.c b/test/cmd/font.c
index 40682e5ce495..1fe05c1ead51 100644
--- a/test/cmd/font.c
+++ b/test/cmd/font.c
@@ -30,13 +30,17 @@  static int font_test_base(struct unit_test_state *uts)
 	ut_assertok(console_record_reset_enable());
 	ut_assertok(run_command("font list", 0));
 	ut_assert_nextline("nimbus_sans_l_regular");
-	ut_assert_nextline("cantoraone_regular");
+	if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_CANTORAONE))
+		ut_assert_nextline("cantoraone_regular");
 	ut_assertok(ut_check_console_end(uts));
 
 	ut_assertok(vidconsole_get_font_size(dev, &name, &size));
 	ut_asserteq_str("nimbus_sans_l_regular", name);
 	ut_asserteq(18, size);
 
+	if (!IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_CANTORAONE))
+		return 0;
+
 	max_metrics = 1;
 	if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE))
 		max_metrics = IF_ENABLED_INT(CONFIG_CONSOLE_TRUETYPE,