summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels De Graef <nielsdegraef@gmail.com>2020-12-19 19:34:00 +0000
committerNiels De Graef <nielsdegraef@gmail.com>2020-12-19 19:34:00 +0000
commit9e12d6596d501bc2c9b784770fb9ffd3d531bfd0 (patch)
tree47dc87b4968947d92d5c45674eccbec9408570b4
parentdd1c242911af926a4bbf01f3be0e689e60f7638d (diff)
parent3ad122a63360fe024512e5d0dcff08c5e3d603d1 (diff)
downloadlibsecret-9e12d6596d501bc2c9b784770fb9ffd3d531bfd0.tar.gz
Merge branch 'meson-fix-test' into 'master'
meson: build test-vala-unstable with -DSECRET_WITH_UNSTABLE Closes #54 See merge request GNOME/libsecret!62
-rw-r--r--libsecret/meson.build25
1 files changed, 16 insertions, 9 deletions
diff --git a/libsecret/meson.build b/libsecret/meson.build
index f57e363..0b37328 100644
--- a/libsecret/meson.build
+++ b/libsecret/meson.build
@@ -310,14 +310,22 @@ if get_option('introspection')
add_languages('vala')
valac = meson.get_compiler('vala')
- valatest_names = [
- 'test-vala-lang',
- 'test-vala-unstable',
+ valatests = [
+ {
+ 'name': 'test-vala-lang',
+ 'cflags': [],
+ },
+ {
+ 'name': 'test-vala-unstable',
+ 'cflags': [ '-DSECRET_WITH_UNSTABLE' ],
+ },
]
- foreach _valatest : valatest_names
- test_bin = executable(_valatest,
- '@0@.vala'.format(_valatest),
+ foreach _valatest: valatests
+ name = _valatest['name']
+ extra_cflags = _valatest['cflags']
+
+ test_bin = executable(name, '@0@.vala'.format(name),
dependencies: [
glib_deps,
valac.find_library('glib-2.0'),
@@ -327,11 +335,10 @@ if get_option('introspection')
],
link_with: mock_service_lib,
include_directories: config_h_dir,
- c_args: test_cflags,
+ c_args: test_cflags + extra_cflags,
)
- test(_valatest, test_bin,
- suite: 'vala',
+ test(name, test_bin, suite: 'vala',
)
endforeach
endif