Skip to content

Fix module tests on Visual Studio builds

Chun-wei Fan requested to merge fix-module-tests-msvc into master

Hi,

This will ensure the entry points in gio/tests/resourceplugins.c are indeed exported for Visual Studio builds as well, so that we can run the modules tests in gio/tests/gresource.c. We also need to ensure the various module tests look for the module DLLs correctly on Visual Studio builds as with Meson, shared modules are built as 'xxxx.dll', not 'libxxxx.dll' when named as 'xxxx'.

From the commit message:

On Visual Studio, Meson builds modules as xxxx.dll, not libxxxx.dll when xxxx is specified as the name for the shared_module() build directive.

This means that in the test programs if we expect for libxxxx for the module name, the test will fail as there is no libxxxx.dll but there is xxxx.dll. This makes the test program look for the module files correctly.

This will fix the tests gio/tests/giomodule.c, gio/tests/gresources.c and tests/test-module.c running on Visual Studio builds.

With blessings, thank you!

Edited by Chun-wei Fan

Merge request reports