summaryrefslogtreecommitdiff
path: root/tests/repository
diff options
context:
space:
mode:
Diffstat (limited to 'tests/repository')
-rw-r--r--tests/repository/meson.build44
1 files changed, 25 insertions, 19 deletions
diff --git a/tests/repository/meson.build b/tests/repository/meson.build
index 3a51a0e3..e1858b66 100644
--- a/tests/repository/meson.build
+++ b/tests/repository/meson.build
@@ -1,27 +1,33 @@
-repository_tests = [
- 'gitestrepo',
- 'giteststructinfo',
- 'gitestthrows',
- # FIXME: Requires Regress typelib which is not yet ported to meson.
- # 'gitypelibtest',
-]
+if glib_dep.type_name() == 'pkgconfig'
-repository_test_env = environment()
-repository_test_env.append(
- 'GI_TYPELIB_PATH',
- join_paths(meson.build_root(), 'gir'),
- join_paths(meson.build_root(), 'tests')
-)
+ repository_tests = {
+ 'gitestrepo': typelibs,
+ 'giteststructinfo': typelibs,
+ 'gitestthrows': typelibs,
+ 'gitypelibtest': [regress_typelib],
+ }
-custom_c_args = cc.get_supported_arguments([
- '-Wno-unused-parameter',
-])
-if glib_dep.type_name() == 'pkgconfig'
- foreach test_name : repository_tests
+ repository_test_env = environment()
+ repository_test_env.prepend(
+ 'GI_TYPELIB_PATH',
+ join_paths(meson.build_root(), 'gir'),
+ join_paths(meson.build_root(), 'tests'),
+ join_paths(meson.build_root(), 'tests', 'scanner'),
+ )
+ if host_system == 'windows'
+ repository_test_env.prepend(
+ 'PATH', join_paths(meson.build_root(), 'tests', 'scanner'))
+ endif
+
+ custom_c_args = cc.get_supported_arguments([
+ '-Wno-unused-parameter',
+ ])
+
+ foreach test_name, depends : repository_tests
source = files(test_name + '.c')
exe = executable(test_name, source,
dependencies: [girepo_dep],
c_args: custom_c_args)
- test(test_name, exe, env: repository_test_env)
+ test(test_name, exe, env: repository_test_env, depends: depends)
endforeach
endif