diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-02-20 18:09:03 +0000 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-02-20 18:09:03 +0000 |
commit | edcdecdd7d1246396f3412218e8187bfbf555a29 (patch) | |
tree | bc450d0885f2232aa80a24168135ea257a1958c5 | |
parent | c6e63fd718231bbef0ee4d8756a333a4500378fc (diff) | |
parent | db36d010737d5eeceff300e3dd5e315c5d0382a2 (diff) | |
download | tracker-edcdecdd7d1246396f3412218e8187bfbf555a29.tar.gz |
Merge branch 'option-tests' into 'master'
build: Add an option to control building tests
See merge request GNOME/tracker!488
-rw-r--r-- | meson.build | 13 | ||||
-rw-r--r-- | meson_options.txt | 2 |
2 files changed, 11 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 4e59b8240..f4dd58fd4 100644 --- a/meson.build +++ b/meson.build @@ -75,9 +75,12 @@ if get_option('man') a2x = find_program('a2x') endif -py_modules = ['gi'] -if get_option('tests_tap_protocol') - py_modules += 'tap' +py_modules = [] +if get_option('tests') + py_modules += 'gi' + if get_option('tests_tap_protocol') + py_modules += 'tap' + endif endif python = import('python').find_installation('python3', modules: py_modules) @@ -358,7 +361,9 @@ tracker_uninstalled_nepomuk_ontologies_dir = join_paths(meson.current_source_dir tracker_uninstalled_stop_words_dir = join_paths(meson.current_source_dir(), 'src', 'libtracker-common', 'stop-words') tracker_uninstalled_testutils_dir = join_paths(meson.current_source_dir(), 'utils') -subdir('tests') +if get_option('tests') + subdir('tests') +endif subdir('examples') subdir('po') diff --git a/meson_options.txt b/meson_options.txt index a7e647d02..ec8ea8bc2 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -20,6 +20,8 @@ option('systemd_user_services', type: 'boolean', value: true, yield: true, description: 'Whether to install systemd user .service files') option('systemd_user_services_dir', type: 'string', value: '', yield: true, description: 'Directory to install systemd user unit files (or empty to use default)') +option('tests', type: 'boolean', value: true, + description: 'Whether to build tests') option('test_utils', type: 'boolean', value: true, description: 'Whether to install the trackertestutils Python package') option('test_utils_dir', type: 'string', value: '', |