1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-28 14:49:30 +00:00
Purism-Calls/tests/meson.build

53 lines
1.3 KiB
Meson
Raw Normal View History

if get_option('tests')
test_env = [
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
'G_DEBUG=gc-friendly,fatal-warnings',
'GSETTINGS_BACKEND=memory',
'PYTHONDONTWRITEBYTECODE=yes',
'MALLOC_CHECK_=2',
]
test_cflags = [
'-fPIE',
]
test_link_args = [
'-fPIC',
]
2018-06-13 13:38:51 +00:00
tests = [
[ 'provider', [] ],
[ 'origin', [ 'provider' ] ],
[ 'call', [ 'provider', 'origin' ] ],
]
2018-06-13 13:38:51 +00:00
foreach test : tests
name = test[0]
2018-06-13 13:38:51 +00:00
setup_bases = test[1]
setup_bases += name
test_sources = []
foreach base : setup_bases
test_sources += [ 'setup-' + base + '.c',
'setup-' + base + '.h' ]
endforeach
2018-06-13 13:38:51 +00:00
test_sources += [ 'test-' + name + '.c',
'common.h' ]
2018-06-13 13:38:51 +00:00
t = executable(name, test_sources,
calls_sources, calls_dummy_sources, calls_enum_sources, calls_resources,
c_args : test_cflags,
link_args: test_link_args,
link_with : gdbofono_lib,
2018-06-13 13:38:51 +00:00
dependencies: calls_deps,
include_directories : include_directories('..',
join_paths('..', 'src')),
2018-06-13 13:38:51 +00:00
)
test(name, t, env: test_env)
endforeach
endif