[meson] Guard tests for disabled optional libraries (#6335)

* [meson] Skip vector tests when vector is disabled

The vector budget test was built unconditionally even when vector was
explicitly disabled. Its empty dependency supplied neither include paths
nor libraries, breaking otherwise valid reduced-feature builds.

Skip the vector test directory when the library is disabled. Add a Linux
CI build and test pass with vector disabled to cover this configuration.

Reproduced the missing hb.h failure on Linux before the fix. The full
suite with vector, raster, and GPU disabled passed 229 tests with one
skip; all three vector tests passed with vector enabled.

Fixes: https://github.com/harfbuzz/harfbuzz/issues/6277
Assisted-by: OpenAI Codex <codex@openai.com>

* [ci] Remove extra vector-disabled build pass

Keep the fix focused on guarding the vector test directory without adding
another build and test pass to the Linux workflow.

CI-only change; the previously validated Meson guard is unchanged.

Assisted-by: OpenAI Codex <codex@openai.com>

* [meson] Guard dependency fuzzers when subset is disabled

With experimental APIs enabled, dependency fuzzers referenced
libharfbuzz_subset even when the subset library was disabled, causing
Meson setup to fail with an unknown-variable error.

Require subset support when building the dependency fuzzers and when
registering their tests.

Full tests with experimental APIs enabled: 92 passed with subset
disabled, and 247 passed with subset enabled. Both dependency fuzzers
and their 13 tests remain registered in the enabled configuration.

Assisted-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Behdad Esfahbod authored and GitHub committed 2026-10-07 12:55:53 -06:00
1 parent bf0828e9f4
commit d997502000
2 files changed
+7 -3

No files matched your search

+3 -3
View File
@@ -73,8 +73,8 @@ foreach file_name : tests
set_variable('@0@_exe'.format(test_name.underscorify()), exe)
endforeach
# Build depend-related fuzzers only if depend_api is enabled
if conf.get('HB_EXPERIMENTAL_API', 0) == 1
# Build depend-related fuzzers only if experimental and subset APIs are enabled
if conf.get('HB_EXPERIMENTAL_API', 0) == 1 and not get_option('subset').disabled()
foreach file_name : depend_tests
test_name = file_name.split('.')[0]
@@ -238,7 +238,7 @@ if not get_option('subset').disabled()
endforeach
endif
if conf.get('HB_EXPERIMENTAL_API', 0) == 1
if conf.get('HB_EXPERIMENTAL_API', 0) == 1 and not get_option('subset').disabled()
if conf.get('HAVE_GLIB', 0) == 1
i = 0
foreach chunk : depend_closure_parity_fonts_glob_chunks
+4
View File
@@ -1,3 +1,7 @@
if get_option('vector').disabled()
subdir_done()
endif
run_test = find_program('run-tests.py')
test_vector_budget = executable('test-vector-budget', 'test-vector-budget.c',