mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-05 23:48:44 +02:00
Enable GIO tests on Windows
1) Remove the non-Windows-only condition for subdir('tests'). 2) Add libiphlpapi, libws2_32 and libsecur32 deps, needed for W32 tests. 3) Remove the -no-undefined argument (gcc doesn't understand it, it *does* understand -Wl,-no-undefined; either way, the test compiles without this argument just fine; maybe meson adds it by itself - you can hardly build shared modules without it). 4) Add or fix a number of includes 5) Disable gdbus-objectmanager tests when building with MSVC (right now these tests don't work on Windows anyway, so the fact that MSVC can't even build them properly is irrelevant; most likely gdbus-codegen needs changes to put _GLIB_EXTERN before each function)
This commit is contained in:
@@ -5,6 +5,10 @@ common_gio_tests_deps = [
|
||||
libgio_dep,
|
||||
]
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
|
||||
endif
|
||||
|
||||
subdir('gdbus-object-manager-example')
|
||||
|
||||
gengiotypefuncs_prog = find_program('gengiotypefuncs.py')
|
||||
@@ -321,22 +325,27 @@ test_extra_programs += [{
|
||||
'extra_sources' : ['gtlsconsoleinteraction.c'],
|
||||
'install' : false,
|
||||
},
|
||||
# These three are manual-run tests because they need a session bus but don't bring one up themselves
|
||||
# FIXME: these build but don't seem to work!
|
||||
'gdbus-example-objectmanager-client' : {
|
||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||
'install' : false,
|
||||
},
|
||||
'gdbus-example-objectmanager-server' : {
|
||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||
'install' : false,
|
||||
},
|
||||
'gdbus-test-fixture' : {
|
||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||
'install' : false,
|
||||
},
|
||||
}]
|
||||
|
||||
if cc.get_id() != 'msvc'
|
||||
test_extra_programs += [{
|
||||
# These three are manual-run tests because they need a session bus but don't bring one up themselves
|
||||
# FIXME: these build but don't seem to work!
|
||||
'gdbus-example-objectmanager-client' : {
|
||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||
'install' : false,
|
||||
},
|
||||
'gdbus-example-objectmanager-server' : {
|
||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||
'install' : false,
|
||||
},
|
||||
'gdbus-test-fixture' : {
|
||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||
'install' : false,
|
||||
},
|
||||
}]
|
||||
endif
|
||||
|
||||
if host_machine.system() != 'windows'
|
||||
test_extra_programs += [{
|
||||
'gdbus-example-unix-fd-client' : {
|
||||
@@ -357,13 +366,8 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
|
||||
'--c-name', '_g_plugin',
|
||||
'@INPUT@'])
|
||||
|
||||
if host_system == 'windows'
|
||||
resource_plugin_platform_link_args = ['-no-undefined']
|
||||
else
|
||||
resource_plugin_platform_link_args = []
|
||||
endif
|
||||
shared_module ('resourceplugin', 'resourceplugin.c', plugin_resources_c,
|
||||
link_args : export_dynamic_ldflags + resource_plugin_platform_link_args,
|
||||
link_args : export_dynamic_ldflags,
|
||||
dependencies : common_gio_tests_deps)
|
||||
|
||||
test_gresource = custom_target('test.gresource',
|
||||
|
Reference in New Issue
Block a user