devenv: Whitelist all plugins to be able to run tests

Meson devenv already overrides GST_PLUGIN_PATH and
GST_PLUGIN_SYSTEM_PATH so only built plugins can be found. That means
unit tests are allowed to use every plugins.

This makes easier to run some unit tests under devenv instead of through
"meson test".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5748>
This commit is contained in:
Xavier Claessens 2023-12-01 08:21:03 -05:00 committed by GStreamer Marge Bot
parent 8210784dab
commit d2fb30a188
2 changed files with 6 additions and 1 deletions

View file

@ -340,6 +340,7 @@ devenv.set('GST_VERSION', meson.project_version())
devenv.set('GST_ENV', 'gst-' + meson.project_version())
devenv.set('GST_REGISTRY', meson.current_build_dir() / 'registry.dat')
devenv.set('GST_PLUGIN_SYSTEM_PATH', '')
devenv.set('GST_PLUGIN_LOADING_WHITELIST', '*')
meson.add_devenv(devenv)
generate_plugins_paths = find_program('scripts/generate_plugins_path.py')

View file

@ -345,7 +345,8 @@ _priv_gst_plugin_initialize (void)
* plugin1,plugin2 or
* source-package@pathprefix or
* source-package@* or just
* source-package
* source-package or
* *
*
* ie. the bit before the path will be checked against both the plugin
* name and the plugin's source package name, to keep the format simple.
@ -361,6 +362,9 @@ gst_plugin_desc_matches_whitelist_entry (const GstPluginDesc * desc,
GST_LOG ("Whitelist pattern '%s', plugin: %s of %s@%s", pattern, desc->name,
desc->source, GST_STR_NULL (filename));
if (strcmp (pattern, "*") == 0)
return TRUE;
/* do we have a path prefix? */
sep = strchr (pattern, '@');
if (sep != NULL && strcmp (sep, "@*") != 0 && strcmp (sep, "@") != 0) {