Skip to content

Commit

Permalink
meson: Allow test cases to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
apprehensions committed Dec 11, 2024
1 parent 2376337 commit a6667f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,13 @@ pkgconfig.generate(
subdir('data')
subdir('src')
subdir('document-portal')
subdir('tests')

enable_pytest = false
enable_tests = get_option('tests')
if enable_tests
subdir('tests')
endif

subdir('po')
subdir('doc')

Expand All @@ -227,6 +233,7 @@ summary({
'Enable libportal support': have_libportal,
'Enable gudev support': have_gudev,
'Enable installed tests:': enable_installed_tests,
'Enable test suite': enable_tests,
'Enable python test suite': enable_pytest,
'Build man pages': rst2man.found(),
'Build flatpak interfaces': flatpak_intf_dir != '',
Expand Down
4 changes: 4 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ option('datarootdir',
type: 'string',
value: '',
description: 'Define the datarootdir for the pkgconf file')
option('tests',
type: 'boolean',
value: true,
description: 'Build unit tests')
option('installed-tests',
type: 'boolean',
value: false,
Expand Down

0 comments on commit a6667f7

Please sign in to comment.