2017-05-02 18:04:58 +02:00
|
|
|
# tests
|
|
|
|
|
2018-07-16 17:52:53 +02:00
|
|
|
test_env = environment()
|
|
|
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
|
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
|
|
test_env.set('G_DEBUG', 'gc-friendly')
|
|
|
|
test_env.set('MALLOC_CHECK_', '2')
|
2017-05-02 18:04:58 +02:00
|
|
|
|
2019-03-05 11:55:19 +01:00
|
|
|
test_cargs = ['-DG_LOG_DOMAIN="GLib"', '-UG_DISABLE_ASSERT']
|
2017-05-02 18:04:58 +02:00
|
|
|
|
2018-09-19 22:09:55 +02:00
|
|
|
test_extra_programs = {
|
|
|
|
'assert-msg-test' : {},
|
|
|
|
}
|
|
|
|
|
|
|
|
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
|
|
|
common_deps = [libm, thread_dep, libglib_dep]
|
|
|
|
|
|
|
|
foreach program_name, extra_args : test_extra_programs
|
|
|
|
source = extra_args.get('source', program_name + '.c')
|
|
|
|
extra_sources = extra_args.get('extra_sources', [])
|
|
|
|
install = installed_tests_enabled and extra_args.get('install', true)
|
|
|
|
executable(program_name, [source, extra_sources],
|
|
|
|
c_args : common_c_args,
|
|
|
|
dependencies : common_deps + extra_args.get('dependencies', []),
|
|
|
|
install_dir : installed_tests_execdir,
|
|
|
|
install : install,
|
2022-05-06 14:16:26 +02:00
|
|
|
win_subsystem : extra_args.get('win_subsystem', 'console'),
|
2018-09-19 22:09:55 +02:00
|
|
|
)
|
|
|
|
endforeach
|