Skip to content

Commit

Permalink
meson: make tests optional
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/926427
Signed-off-by: Greg Kubaryk <[email protected]>
Signed-off-by: Sam James <[email protected]>
(cherry picked from commit 988e475)
  • Loading branch information
gkubaryk authored and thesamesam committed Mar 12, 2024
1 parent 806d0cc commit d00c9f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ endif
subdir('bin')
subdir('pym')

pytest = find_program('pytest')
test('pytest', pytest, args : ['-v', meson.current_source_dir() / 'pym'])
if get_option('tests')
pytest = find_program('pytest')
test('pytest', pytest, args : ['-v', meson.current_source_dir() / 'pym'])
endif

if get_option('code-only')
subdir_done()
Expand Down
4 changes: 4 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ option('eprefix', type : 'string',
option('docdir', type : 'string',
description : 'Documentation directory'
)

option('tests', type : 'boolean', value: false,
description : 'Enable tests'
)

0 comments on commit d00c9f8

Please sign in to comment.