Refactor test/api/meson.build and always run test-unicode test
This commit is contained in:
parent
0133cb55e2
commit
ac26f19c9e
@ -24,11 +24,6 @@ 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-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',
|
||||||
@ -48,13 +43,11 @@ 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',
|
||||||
]
|
]
|
||||||
|
|
||||||
icu_tests = []
|
|
||||||
if conf.get('HAVE_ICU', 0) == 1
|
|
||||||
icu_tests += 'test-unicode.c'
|
|
||||||
endif
|
|
||||||
|
|
||||||
if conf.get('HAVE_FREETYPE', 0) == 1
|
if conf.get('HAVE_FREETYPE', 0) == 1
|
||||||
tests += 'test-ot-math.c'
|
tests += 'test-ot-math.c'
|
||||||
endif
|
endif
|
||||||
@ -73,30 +66,18 @@ if conf.get('HAVE_GLIB', 0) == 1
|
|||||||
|
|
||||||
foreach source : tests
|
foreach source : tests
|
||||||
test_name = source.split('.')[0]
|
test_name = source.split('.')[0]
|
||||||
test(test_name, executable(test_name, source,
|
|
||||||
include_directories: [incconfig, incsrc],
|
|
||||||
dependencies: deps,
|
|
||||||
link_with: libharfbuzz,
|
|
||||||
install: false,
|
|
||||||
), env: env)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
foreach source : subset_tests
|
link_withs = libharfbuzz
|
||||||
test_name = source.split('.')[0]
|
if test_name.contains('-subset')
|
||||||
test(test_name, executable(test_name, source,
|
link_withs = [libharfbuzz, libharfbuzz_subset]
|
||||||
include_directories: [incconfig, incsrc],
|
elif test_name == 'test-unicode' and have_icu and not have_icu_builtin
|
||||||
dependencies: deps,
|
link_withs = [libharfbuzz, libharfbuzz_icu]
|
||||||
link_with: [libharfbuzz, libharfbuzz_subset],
|
endif
|
||||||
install: false,
|
|
||||||
), env: env)
|
|
||||||
endforeach
|
|
||||||
|
|
||||||
foreach source : icu_tests
|
|
||||||
test_name = source.split('.')[0]
|
|
||||||
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: have_icu_builtin ? [libharfbuzz] : [libharfbuzz, libharfbuzz_icu],
|
link_with: link_withs,
|
||||||
install: false,
|
install: false,
|
||||||
), env: env)
|
), env: env)
|
||||||
endforeach
|
endforeach
|
||||||
|
Loading…
Reference in New Issue
Block a user