meson: Use the tests option for validate
This is what gstreamer core does too, and avoids a configure error when tests are disabled globally. Also print a useful error when gst_tester is not found from the gstreamer subproject. This broke in https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/667 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/697>
This commit is contained in:
parent
4986138c16
commit
30509252ca
@ -87,5 +87,3 @@ option('package-origin', type : 'string', value : 'Unknown package origin', yiel
|
|||||||
description : 'package origin URL to use in plugins')
|
description : 'package origin URL to use in plugins')
|
||||||
option('doc', type : 'feature', value : 'auto', yield: true,
|
option('doc', type : 'feature', value : 'auto', yield: true,
|
||||||
description: 'Enable documentation.')
|
description: 'Enable documentation.')
|
||||||
option('validate', type : 'feature', value : 'auto', yield: true,
|
|
||||||
description: 'Enable validate tests.')
|
|
||||||
|
@ -10,11 +10,8 @@ gst_plugin_scanner_path = join_paths(gst_plugin_scanner_dir, 'gst-plugin-scanner
|
|||||||
if not get_option('tests').disabled() and gst_check_dep.found()
|
if not get_option('tests').disabled() and gst_check_dep.found()
|
||||||
subdir('check')
|
subdir('check')
|
||||||
subdir('icles')
|
subdir('icles')
|
||||||
|
subdir('validate')
|
||||||
endif
|
endif
|
||||||
if not get_option('examples').disabled()
|
if not get_option('examples').disabled()
|
||||||
subdir('examples')
|
subdir('examples')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not get_option('validate').disabled()
|
|
||||||
subdir('validate')
|
|
||||||
endif
|
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
if gst_dep.type_name() == 'internal'
|
if gst_dep.type_name() == 'internal'
|
||||||
gst_tester = gst_proj.get_variable('gst_tester')
|
gst_tester = gst_proj.get_variable('gst_tester', false)
|
||||||
|
if gst_tester == false
|
||||||
|
if get_option('tests').enabled()
|
||||||
|
error('Tests are enabled for gst-plugins-base but were not enabled for the gstreamer subproject')
|
||||||
|
endif
|
||||||
|
subdir_done()
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
gst_tester = find_program('gst-tester-@0@'.format(api_version), required: get_option('validate'))
|
gst_tester = find_program('gst-tester-@0@'.format(api_version), required: get_option('tests'))
|
||||||
if not gst_tester.found()
|
if not gst_tester.found()
|
||||||
subdir_done()
|
subdir_done()
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user