Merge branch 'meson-fix-test' into 'master'

meson: build test-vala-unstable with -DSECRET_WITH_UNSTABLE

Closes #54

See merge request GNOME/libsecret!62
This commit is contained in:
Niels De Graef 2020-12-19 19:34:00 +00:00
commit 9e12d6596d

View File

@ -310,14 +310,22 @@ if get_option('introspection')
add_languages('vala') add_languages('vala')
valac = meson.get_compiler('vala') valac = meson.get_compiler('vala')
valatest_names = [ valatests = [
'test-vala-lang', {
'test-vala-unstable', 'name': 'test-vala-lang',
'cflags': [],
},
{
'name': 'test-vala-unstable',
'cflags': [ '-DSECRET_WITH_UNSTABLE' ],
},
] ]
foreach _valatest : valatest_names foreach _valatest: valatests
test_bin = executable(_valatest, name = _valatest['name']
'@0@.vala'.format(_valatest), extra_cflags = _valatest['cflags']
test_bin = executable(name, '@0@.vala'.format(name),
dependencies: [ dependencies: [
glib_deps, glib_deps,
valac.find_library('glib-2.0'), valac.find_library('glib-2.0'),
@ -327,11 +335,10 @@ if get_option('introspection')
], ],
link_with: mock_service_lib, link_with: mock_service_lib,
include_directories: config_h_dir, include_directories: config_h_dir,
c_args: test_cflags, c_args: test_cflags + extra_cflags,
) )
test(_valatest, test_bin, test(name, test_bin, suite: 'vala',
suite: 'vala',
) )
endforeach endforeach
endif endif