support/testing: harfbuzz: new runtime test

Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
This commit is contained in:
Raphaël Mélotte
2026-09-30 14:38:49 +02:00
committed by Julien Olivain
parent 850e5de7ea
commit 7fccf3a91e
2 changed files with 34 additions and 0 deletions

View File

@@ -2861,6 +2861,7 @@ F: support/testing/tests/package/sample_python_s3transfer.py
F: support/testing/tests/package/sample_python_sdbus.py
F: support/testing/tests/package/sample_python_sdbus_networkmanager.py
F: support/testing/tests/package/sample_python_urllib3.py
F: support/testing/tests/package/test_harfbuzz.py
F: support/testing/tests/package/test_nginx_modsecurity/
F: support/testing/tests/package/test_nginx_modsecurity.py
F: support/testing/tests/package/test_python_jmespath.py

View File

@@ -0,0 +1,33 @@
import os
import infra.basetest
class TestHarfbuzz(infra.basetest.BRTest):
config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
"""
BR2_PACKAGE_HARFBUZZ=y
BR2_PACKAGE_LIBGLIB2=y
BR2_PACKAGE_DEJAVU=y
BR2_TARGET_ROOTFS_CPIO=y
# BR2_TARGET_ROOTFS_TAR is not set
"""
def test_run(self):
cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
self.emulator.boot(arch="armv5",
kernel="builtin",
options=["-initrd", cpio_file])
self.emulator.login()
# The hb-shape utility needs a fond.
font = "/usr/share/fonts/dejavu/DejaVuSans.ttf"
# The library loads and the utility runs.
self.assertRunOk("hb-shape --version")
# Basic invocation with a font.
cmd = f"hb-shape --no-positions {font} A"
output, exit_code = self.emulator.run(cmd)
self.assertEqual(exit_code, 0)
self.assertEqual(output[0], "[A=0]")