[meson] test/api, separate subset tests

This commit is contained in:
Ebrahim Byagowi 2020-03-24 20:58:38 +04:30
parent 600bf21fbc
commit 68df3f7dac

View File

@ -24,6 +24,12 @@ if conf.get('HAVE_GLIB', 0) == 1
'test-ot-metrics-tt-var.c', 'test-ot-metrics-tt-var.c',
'test-set.c', 'test-set.c',
'test-shape.c', 'test-shape.c',
'test-unicode.c',
'test-var-coords.c',
'test-version.c',
]
subset_tests = [
'test-subset.c', 'test-subset.c',
'test-subset-cmap.c', 'test-subset-cmap.c',
'test-subset-drop-tables.c', 'test-subset-drop-tables.c',
@ -43,9 +49,6 @@ if conf.get('HAVE_GLIB', 0) == 1
'test-subset-gpos.c', 'test-subset-gpos.c',
'test-subset-colr.c', 'test-subset-colr.c',
'test-subset-cbdt.c', 'test-subset-cbdt.c',
'test-unicode.c',
'test-var-coords.c',
'test-version.c',
] ]
if conf.get('HAVE_FREETYPE', 0) == 1 if conf.get('HAVE_FREETYPE', 0) == 1
@ -69,7 +72,16 @@ if conf.get('HAVE_GLIB', 0) == 1
test(test_name, executable(test_name, source, test(test_name, executable(test_name, source,
include_directories: [incconfig, incsrc], include_directories: [incconfig, incsrc],
dependencies: deps, dependencies: deps,
link_with: [libharfbuzz] + (source.contains('-subset') ? [libharfbuzz_subset] : []), link_with: libharfbuzz,
), env: env)
endforeach
foreach source : subset_tests
test_name = source.split('.')[0]
test(test_name, executable(test_name, source,
include_directories: [incconfig, incsrc],
dependencies: deps,
link_with: [libharfbuzz, libharfbuzz_subset],
), env: env) ), env: env)
endforeach endforeach
else else