Commit b9e27e28 authored by Mart Raudsepp's avatar Mart Raudsepp

meson: Allow disabling build of tests

Fixes #121
parent d4022286
Pipeline #206992 passed with stages
in 9 minutes and 23 seconds
......@@ -54,6 +54,7 @@ folks_backend_dir = get_option('libdir') / 'folks' / '@0@'.format(folks_module_v
bluez_backend_enabled = get_option('bluez_backend')
docs_enabled = get_option('docs')
eds_backend_enabled = get_option('eds_backend')
tests_enabled = get_option('tests')
installed_tests_enabled = get_option('installed_tests')
ofono_backend_enabled = get_option('ofono_backend')
telepathy_backend_enabled = get_option('telepathy_backend')
......@@ -130,13 +131,15 @@ endif
if bluez_backend_enabled
libebook_dep = dependency('libebook-1.2', version: '>=' + min_eds_version)
# Needed for the BlueZ tests
pymod = import('python')
py_installation = pymod.find_installation('python3',
modules: [
'dbusmock',
],
)
if tests_enabled
# Needed for the BlueZ tests
pymod = import('python')
py_installation = pymod.find_installation('python3',
modules: [
'dbusmock',
],
)
endif
endif
if import_tool_enabled
......@@ -233,7 +236,9 @@ subdir('tools')
subdir('po')
# Tests
subdir('tests')
if tests_enabled
subdir('tests')
endif
if docs_enabled
subdir('docs')
......
......@@ -11,6 +11,7 @@ option('inspect_tool', type: 'boolean', value: true, description: 'Enable buildi
# Profiling
option('profiling', type: 'boolean', value: false, description: 'Enable profiling code')
# Test options
option('tests', type: 'boolean', value: true, description: 'Build tests programs')
option('installed_tests', type: 'boolean', value: false, description: 'Install test programs')
# Docs
option('docs', type: 'boolean', value: false, description: 'Enable documentation generation')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment