mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-19 07:11:55 -09:00
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:
committed by
Julien Olivain
parent
850e5de7ea
commit
7fccf3a91e
@@ -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
|
||||
|
||||
33
support/testing/tests/package/test_harfbuzz.py
Normal file
33
support/testing/tests/package/test_harfbuzz.py
Normal 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]")
|
||||
Reference in New Issue
Block a user