Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-05-27 14:42:38 +0300
committerTim-Philipp Müller <tim@centricular.com>2020-05-27 14:42:38 +0300
commit5f91be7ea02e49fb42db3aa600bee519a6e2d544 (patch)
treedfb89f766099ab88787bb41a404c56144f1e6740 /tests
parent3fdae346cab21f66d0beef283e46314ae5741943 (diff)
tests: fix meson test env setup to make sure we use the right gst-plugin-scanner
If core is built as a subproject (e.g. as in gst-build), make sure to use the gst-plugin-scanner from the built subproject. Without this, gstreamer might accidentally use the gst-plugin-scanner from the install prefix if that exists, which in turn might drag in gst library versions we didn't mean to drag in. Those gst library versions might then be older than what our current build needs, and might cause our newly-built plugins to get blacklisted in the test registry because they rely on a symbol that the wrongly-pulled in gst lib doesn't have. This should fix running of unit tests in gst-build when invoking meson test or ninja test from outside the devenv for the case where there is an older or different-version gst-plugin-scanner installed in the install prefix. In case no gst-plugin-scanner is installed in the install prefix, this will fix "GStreamer-WARNING: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual." warnings when running the unit tests. In the case where we find GStreamer core via pkg-config we use a newly-added pkg-config var "pluginscannerdir" to get the right directory. This has the benefit of working transparently for both installed and uninstalled pkg-config files/setups. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/603>
Diffstat (limited to 'tests')
-rw-r--r--tests/check/meson.build7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/check/meson.build b/tests/check/meson.build
index 270799ff7..f4cb75717 100644
--- a/tests/check/meson.build
+++ b/tests/check/meson.build
@@ -151,10 +151,14 @@ test_defines = [
pluginsdirs = []
if gst_dep.type_name() == 'pkgconfig'
- pbase = dependency('gstreamer-plugins-base-' + api_version, required : false)
+ pbase = dependency('gstreamer-plugins-base-' + api_version, required: true)
pluginsdirs = [gst_dep.get_pkgconfig_variable('pluginsdir'),
pbase.get_pkgconfig_variable('pluginsdir')]
+ gst_plugin_scanner_dir = gst_dep.get_pkgconfig_variable('pluginscannerdir')
+else
+ gst_plugin_scanner_dir = subproject('gstreamer').get_variable('gst_scanner_dir')
endif
+gst_plugin_scanner_path = join_paths(gst_plugin_scanner_dir, 'gst-plugin-scanner')
# fake device drivers: we could run hardware element tests against dummy drivers
# v4l2: vivo (part of normal kernel)
@@ -196,6 +200,7 @@ foreach t : good_tests
env.set('GSETTINGS_BACKEND', 'memory')
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
+ env.set('GST_PLUGIN_SCANNER_1_0', gst_plugin_scanner_path)
exe = executable(test_name, fname, extra_sources,
include_directories : [configinc, libsinc],
c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,