mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-04 20:07:36 +00:00
tests: Use CALLS_PLUGIN_DIR to search for plugins in the build dir
There is no need to add a second variable to search for plugins, we can use CALLS_PLUGIN_DIR directly.
This commit is contained in:
parent
d804b996f4
commit
270d145b65
6 changed files with 14 additions and 20 deletions
|
@ -47,8 +47,6 @@ full_servicedir = join_paths(prefix, get_option('datadir'), 'dbus-1', 'services'
|
|||
localedir = get_option('localedir')
|
||||
full_localedir = join_paths(prefix, localedir)
|
||||
full_calls_plugin_libdir = join_paths(prefix, libdir, calls_name, 'plugins')
|
||||
# Path to plugins inside the build dir, used for testing
|
||||
full_calls_plugin_builddir = join_paths(builddir, 'plugins')
|
||||
|
||||
libcall_ui_dep = dependency('call-ui',
|
||||
fallback: ['libcall-ui', 'libcall_ui_dep'],
|
||||
|
|
|
@ -32,12 +32,12 @@ test_env = [
|
|||
'CALLS_AUDIOSRC=audiotestsrc',
|
||||
'CALLS_AUDIOSINK=fakesink',
|
||||
'GSETTINGS_SCHEMA_DIR=@0@/data'.format(meson.project_build_root()),
|
||||
'CALLS_PLUGIN_DIR=@0@/plugins'.format(meson.project_build_root()),
|
||||
]
|
||||
|
||||
test_cflags = [
|
||||
'-DFOR_TESTING',
|
||||
'-Wno-error=deprecated-declarations',
|
||||
'-DPLUGIN_BUILDDIR="@0@"'.format(full_calls_plugin_builddir),
|
||||
]
|
||||
|
||||
test_link_args = [
|
||||
|
|
|
@ -429,10 +429,6 @@ main (int argc,
|
|||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
gst_init (NULL, NULL);
|
||||
|
||||
#ifdef PLUGIN_BUILDDIR
|
||||
peas_engine_add_search_path (peas_engine_get_default (), PLUGIN_BUILDDIR, NULL);
|
||||
#endif
|
||||
/* this is a workaround for an issue with sofia: https://github.com/freeswitch/sofia-sip/issues/58 */
|
||||
su_random64 ();
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ test_env = [
|
|||
'MALLOC_CHECK_=2',
|
||||
'NO_AT_BRIDGE=1',
|
||||
'GSETTINGS_SCHEMA_DIR=@0@/data'.format(meson.project_build_root()),
|
||||
'CALLS_PLUGIN_DIR=@0@/plugins'.format(meson.project_build_root()),
|
||||
]
|
||||
|
||||
test_cflags = [
|
||||
'-DFOR_TESTING',
|
||||
'-Wno-error=deprecated-declarations',
|
||||
'-DPLUGIN_BUILDDIR="@0@"'.format(full_calls_plugin_builddir),
|
||||
]
|
||||
|
||||
test_link_args = [
|
||||
|
|
|
@ -262,12 +262,6 @@ main (gint argc,
|
|||
|
||||
gtk_test_init (&argc, &argv, NULL);
|
||||
|
||||
/* Add builddir as search path */
|
||||
#ifdef PLUGIN_BUILDDIR
|
||||
plugin_dir_provider = g_build_filename (PLUGIN_BUILDDIR, "provider", NULL);
|
||||
peas_engine_add_search_path (peas_engine_get_default (), plugin_dir_provider, NULL);
|
||||
#endif
|
||||
|
||||
g_test_add_func("/Calls/Manager/without_provider", test_calls_manager_without_provider);
|
||||
g_test_add_func("/Calls/Manager/dummy_provider", test_calls_manager_dummy_provider);
|
||||
g_test_add_func("/Calls/Manager/mm_provider", test_calls_manager_mm_provider);
|
||||
|
|
|
@ -48,7 +48,6 @@ gint
|
|||
main (gint argc,
|
||||
gchar *argv[])
|
||||
{
|
||||
g_autofree char *plugin_dir_provider = NULL;
|
||||
PeasEngine *peas;
|
||||
const gchar *dir;
|
||||
g_autofree char *default_plugin_dir_provider = NULL;
|
||||
|
@ -57,11 +56,18 @@ main (gint argc,
|
|||
|
||||
peas = peas_engine_get_default ();
|
||||
|
||||
/* Add builddir as search path */
|
||||
#ifdef PLUGIN_BUILDDIR
|
||||
plugin_dir_provider = g_build_filename (PLUGIN_BUILDDIR, "provider", NULL);
|
||||
peas_engine_add_search_path (peas_engine_get_default (), plugin_dir_provider, NULL);
|
||||
#endif
|
||||
dir = g_getenv ("CALLS_PLUGIN_DIR");
|
||||
if (dir && dir[0] != '\0') {
|
||||
g_autofree char *plugin_dir_provider = NULL;
|
||||
plugin_dir_provider = g_build_filename (dir, "provider", NULL);
|
||||
g_debug ("Adding %s to plugin search path", plugin_dir_provider);
|
||||
peas_engine_prepend_search_path (peas, plugin_dir_provider, NULL);
|
||||
}
|
||||
|
||||
default_plugin_dir_provider = g_build_filename (PLUGIN_LIBDIR, "provider", NULL);
|
||||
g_debug ("Adding %s to plugin search path", default_plugin_dir_provider);
|
||||
peas_engine_add_search_path (peas, default_plugin_dir_provider, NULL);
|
||||
peas_engine_rescan_plugins (peas);
|
||||
|
||||
dir = g_getenv ("CALLS_PLUGIN_DIR");
|
||||
if (dir && dir[0] != '\0') {
|
||||
|
|
Loading…
Reference in a new issue