Skip to content

Commit

Permalink
tests: enable and disable via an option
Browse files Browse the repository at this point in the history
Add an option named "tests" to enable or disable test suite during
builds. If tests are disabled, libblkio subproject is also not built.

Signed-off-by: Valentin Sinitsyn <[email protected]>
  • Loading branch information
Valentine Sinitsyn committed Mar 23, 2024
1 parent 2140ec1 commit dadcad0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
20 changes: 11 additions & 9 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ libvhost = static_library(
c_args: libvhost_args + libvhost_optional_args + libvhost_defines,
)

libblkio_proj = subproject(
'libblkio',
default_options: [
'subproject-docs=disabled',
'subproject-examples=enabled', # used in libvhost tests
'subproject-tests=disabled'
]
)
subdir('tests')
if not get_option('tests').disabled()
libblkio_proj = subproject(
'libblkio',
default_options: [
'subproject-docs=disabled',
'subproject-examples=enabled', # used in libvhost tests
'subproject-tests=disabled'
]
)
subdir('tests')
endif
1 change: 1 addition & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
option('tests', type : 'feature', value : 'auto', description : 'Build tests and pull libblkio subproject')

0 comments on commit dadcad0

Please sign in to comment.