tests: validate: Add workaround for older meson versions

subproject.get_variable() only has fallback since 0.51

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/710>
This commit is contained in:
Tim-Philipp Müller 2020-06-18 10:40:14 +01:00
parent f84f7a2cec
commit aecd0f660f

View file

@ -1,4 +1,5 @@
if gst_dep.type_name() == 'internal'
if meson.version().version_compare('>= 0.51')
gst_tester = gst_proj.get_variable('gst_tester', false)
if gst_tester == false
if get_option('tests').enabled()
@ -6,6 +7,11 @@ if gst_dep.type_name() == 'internal'
endif
subdir_done()
endif
else
# Workaround for meson < 0.51. Remove once we bump the requirement.
# If you hit this, disable tests in gst-plugins-base.
gst_tester = gst_proj.get_variable('gst_tester')
endif
else
gst_tester = find_program('gst-tester-@0@'.format(api_version), required: get_option('tests'))
if not gst_tester.found()