mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-10-31 18:55:22 +00:00
460c0c6c3d
This is an initial, static implementation of plugins. The CallsApplication has a plugin name which can be changed with a new --provider command line option. This plugin name is used to instantiate the appropriate plugin when the application is activated. From then on, the plugin cannot change. In future, we can expand this support to include loading multiple plugins at once, configurable through some UI. This will have far-reaching implications though, and complicate things like enumerating the provider hierarchy. There is also no practical benefit right now; the mm and ofono plugins can't be used at the same time because ModemManager and oFono don't play nice together, and the whole raison d'être of the dummy plugin is undermined if you can make use of one of the others. So for now, we just implement one static plugin.
56 lines
1.3 KiB
Meson
56 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',
|
|
'-DFOR_TESTING'
|
|
]
|
|
|
|
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, 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 : [
|
|
top_include,
|
|
src_include,
|
|
dummy_include
|
|
]
|
|
)
|
|
test(name, t, env: test_env)
|
|
endforeach
|
|
|
|
endif
|