mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
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:
parent
8210784dab
commit
d2fb30a188
2 changed files with 6 additions and 1 deletions
|
@ -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')
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue