tests: validate: Add workaround for older meson versions
authorTim-Philipp Müller <tim@centricular.com>
Thu, 18 Jun 2020 09:40:14 +0000 (10:40 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 18 Jun 2020 09:41:17 +0000 (10:41 +0100)
subproject.get_variable() only has fallback since 0.51

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/710>

tests/validate/meson.build

index da1f159..b4f47aa 100644 (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()