diff --git a/DEVELOPERS b/DEVELOPERS index d62bfaafb3..7fa97fb36d 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -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 diff --git a/support/testing/tests/package/test_harfbuzz.py b/support/testing/tests/package/test_harfbuzz.py new file mode 100644 index 0000000000..4259a87514 --- /dev/null +++ b/support/testing/tests/package/test_harfbuzz.py @@ -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]")