mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-23 10:27:51 +02:00
meson: Add tests for generated pkg-config files
Ensure things are generated as we expect and avoid we regress on that.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user