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:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user