Add tests build option

This commit is contained in:
Sebastian Ramacher 2018-11-27 22:42:25 +01:00
parent 48297a097f
commit 80b9680271
3 changed files with 8 additions and 3 deletions

View File

@ -36,7 +36,7 @@ appdata = i18n.merge_file('appdata',
po_dir: podir,
)
desktop_file_validate = find_program('desktop-file-validate', required: false, native: true)
desktop_file_validate = find_program('desktop-file-validate', required: get_option('tests'), native: true)
if desktop_file_validate.found()
test('validate-desktop',
desktop_file_validate,
@ -44,7 +44,7 @@ if desktop_file_validate.found()
)
endif
appstream_util = find_program('appstream-util', required: false, native: true)
appstream_util = find_program('appstream-util', required: get_option('tests'), native: true)
if appstream_util.found()
test('validate-appdata',
appstream_util,

View File

@ -23,3 +23,8 @@ option('manpages',
value: 'auto',
description: 'manual pages'
)
option('tests',
type: 'feature',
value: 'auto',
description: 'run tests'
)

View File

@ -1,4 +1,4 @@
check = dependency('check', required: false)
check = dependency('check', required: get_option('tests'))
if check.found()
test_dependencies = [
declare_dependency(link_with: libzathura),