Skip to content
Snippets Groups Projects
Commit d7601431 authored by Emmanuele Bassi's avatar Emmanuele Bassi
Browse files

Allow disabling installed tests

Follow what GLib does, down to the same configuration option.

Fixes: #72
parent 9dd8fab5
No related branches found
No related tags found
No related merge requests found
...@@ -31,7 +31,9 @@ test_data = [ ...@@ -31,7 +31,9 @@ test_data = [
installed_test_bindir = json_libexecdir / 'installed-tests' / json_api_name installed_test_bindir = json_libexecdir / 'installed-tests' / json_api_name
installed_test_datadir = json_datadir / 'installed-tests' / json_api_name installed_test_datadir = json_datadir / 'installed-tests' / json_api_name
install_data(test_data, install_dir: installed_test_bindir) if get_option('installed_tests')
install_data(test_data, install_dir: installed_test_bindir)
endif
foreach t: tests foreach t: tests
installed_test = '@0@.test'.format(t) installed_test = '@0@.test'.format(t)
...@@ -46,14 +48,14 @@ foreach t: tests ...@@ -46,14 +48,14 @@ foreach t: tests
'--outdir=@OUTDIR@', '--outdir=@OUTDIR@',
'--outfile=@0@'.format(installed_test), '--outfile=@0@'.format(installed_test),
], ],
install: true, install: get_option('installed_tests'),
install_dir: installed_test_datadir, install_dir: installed_test_datadir,
) )
exe = executable( exe = executable(
t, '@0@.c'.format(t), t, '@0@.c'.format(t),
c_args: json_c_args, c_args: json_c_args,
install: true, install: get_option('installed_tests'),
install_dir: installed_test_bindir, install_dir: installed_test_bindir,
dependencies: [ json_glib_dep, ], dependencies: [ json_glib_dep, ],
) )
......
...@@ -191,6 +191,7 @@ summary({ ...@@ -191,6 +191,7 @@ summary({
'Documentation': build_doc, 'Documentation': build_doc,
'Manual pages': get_option('man'), 'Manual pages': get_option('man'),
'Tests': get_option('tests'), 'Tests': get_option('tests'),
'Installed tests': get_option('installed_tests'),
'Conformance tests': get_option('conformance'), 'Conformance tests': get_option('conformance'),
}, },
section: 'Build', section: 'Build',
......
...@@ -27,3 +27,6 @@ option('conformance', ...@@ -27,3 +27,6 @@ option('conformance',
option('nls', option('nls',
type: 'feature', value: 'auto', yield: true, type: 'feature', value: 'auto', yield: true,
description: 'Enable native language support (translations)') description: 'Enable native language support (translations)')
option('installed_tests',
type: 'boolean', value: true,
description: 'Enable installed tests')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment