[meson] Use subdir_done to simplify test/api/meson.build
This commit is contained in:
parent
a79d0e405b
commit
759ab4fe56
@ -1,5 +1,9 @@
|
||||
if conf.get('HAVE_GLIB', 0) == 1
|
||||
tests = [
|
||||
if conf.get('HAVE_GLIB', 0) == 0
|
||||
message('You need to have glib support enabled to run test/api tests')
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
tests = [
|
||||
'test-aat-layout.c',
|
||||
'test-baseline.c',
|
||||
'test-blob.c',
|
||||
@ -46,25 +50,25 @@ if conf.get('HAVE_GLIB', 0) == 1
|
||||
'test-unicode.c',
|
||||
'test-var-coords.c',
|
||||
'test-version.c',
|
||||
]
|
||||
]
|
||||
|
||||
if conf.get('HAVE_FREETYPE', 0) == 1
|
||||
if conf.get('HAVE_FREETYPE', 0) == 1
|
||||
tests += 'test-ot-math.c'
|
||||
endif
|
||||
endif
|
||||
|
||||
if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
|
||||
if conf.get('HAVE_FREETYPE', 0) == 1 and conf.get('HAVE_PTHREAD', 0) == 1
|
||||
tests += 'test-multithread.c'
|
||||
endif
|
||||
endif
|
||||
|
||||
# Default test running environment
|
||||
env = environment()
|
||||
env.set('MALLOC_CHECK_', '2')
|
||||
env.set('G_DEBUG', 'gc-friendly')
|
||||
env.set('G_SLICE', 'always-malloc')
|
||||
env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||
# Default test running environment
|
||||
env = environment()
|
||||
env.set('MALLOC_CHECK_', '2')
|
||||
env.set('G_DEBUG', 'gc-friendly')
|
||||
env.set('G_SLICE', 'always-malloc')
|
||||
env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||
env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
||||
|
||||
foreach source : tests
|
||||
foreach source : tests
|
||||
test_name = source.split('.')[0]
|
||||
|
||||
link_withs = libharfbuzz
|
||||
@ -80,7 +84,4 @@ if conf.get('HAVE_GLIB', 0) == 1
|
||||
link_with: link_withs,
|
||||
install: false,
|
||||
), env: env)
|
||||
endforeach
|
||||
else
|
||||
message('You need to have glib support enabled to run test/api tests')
|
||||
endif
|
||||
endforeach
|
||||
|
Loading…
Reference in New Issue
Block a user