diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-01 19:11:02 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-01-01 19:21:07 +0100 |
commit | 3788335b40e9fb1b43a6ff981ab859d4e8787d85 (patch) | |
tree | f8d0ba78e903e518c3f43425ff2784f96e773435 /tests/repository | |
parent | 295dcbd57c40d530abbc791cb5c1da15dea45d82 (diff) | |
download | gobject-introspection-3788335b40e9fb1b43a6ff981ab859d4e8787d85.tar.gz |
meson: port more typelib tests
Diffstat (limited to 'tests/repository')
-rw-r--r-- | tests/repository/meson.build | 44 |
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 |