diff options
Diffstat (limited to 'gmodule/tests/meson.build')
-rw-r--r-- | gmodule/tests/meson.build | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build index ec7eb68fd..5374c1c2a 100644 --- a/gmodule/tests/meson.build +++ b/gmodule/tests/meson.build @@ -124,3 +124,31 @@ foreach test_name, extra_args : gmodule_tests suite : suite, ) endforeach + +if have_bash and have_pkg_config + modules = [ + 'gmodule-no-export-2.0', + 'gmodule-export-2.0', + 'gmodule-2.0', + ] + + foreach module: modules + test(module + '-pkg-config', + bash, + args: [ + '-xe', '-c', + '\n'.join([ + 'pkg-config --validate ' + module, + 'test "$(pkg-config --modversion @0@)" = "@1@"'.format( + module, glib_version), + 'test "$(pkg-config --variable=prefix @0@)" = "@1@"'.format( + module, get_option('prefix')), + ]), + ], + suite: ['gmodule', 'no-valgrind', 'pkg-config'], + env: { + 'PKG_CONFIG_PATH': meson.project_build_root() / 'meson-private', + }, + ) + endforeach +endif |