mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-11-16 21:46:33 +00:00
52 lines
1.3 KiB
Meson
52 lines
1.3 KiB
Meson
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',
|
|
]
|
|
|
|
tests = [
|
|
[ 'provider', [] ],
|
|
[ 'origin', [ 'provider' ] ],
|
|
[ 'call', [ 'provider', 'origin' ] ],
|
|
]
|
|
|
|
foreach test : tests
|
|
name = test[0]
|
|
|
|
setup_bases = test[1]
|
|
setup_bases += name
|
|
|
|
test_sources = []
|
|
foreach base : setup_bases
|
|
test_sources += [ 'setup-' + base + '.c',
|
|
'setup-' + base + '.h' ]
|
|
endforeach
|
|
test_sources += [ 'test-' + name + '.c',
|
|
'common.h' ]
|
|
|
|
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,
|
|
dependencies: calls_deps,
|
|
include_directories : include_directories('..',
|
|
join_paths('..', 'src')),
|
|
)
|
|
test(name, t, env: test_env)
|
|
endforeach
|
|
|
|
endif
|