build: make all tests optional

This can help cut down on link times a bit when working on things.
This commit is contained in:
Ernestas Kulik 2018-03-15 22:44:56 +02:00
parent f7c4352ab8
commit 510a8303dd
5 changed files with 7 additions and 5 deletions

View file

@ -56,6 +56,6 @@ check_eel = executable(
]
)
if get_option('display-tests')
if get_option('tests') == 'all'
test('check-eel', check_eel)
endif

View file

@ -121,7 +121,9 @@ subdir('eel')
subdir('libnautilus-extension')
subdir('src')
subdir('test')
if get_option('tests') != 'none'
subdir('test')
endif
subdir('data')
subdir('po')
if get_option('docs')

View file

@ -3,4 +3,4 @@ option('profiling', type: 'boolean', value: false)
option('extensions', type: 'boolean', value: true)
option('packagekit', type: 'boolean', value: true)
option('selinux', type: 'boolean', value: false)
option('display-tests', type: 'boolean', value: false)
option('tests', type: 'combo', choices: ['none', 'headless', 'all'], value: 'headless')

View file

@ -303,7 +303,7 @@ nautilus = executable(
install: true
)
if get_option('display-tests')
if get_option('tests') == 'all'
test(
'nautilus', nautilus,
args: [

View file

@ -1,4 +1,4 @@
subdir('displayless')
if get_option('display-tests')
if get_option('tests') == 'all'
subdir('display')
endif