mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Merge branch 'pr/fix_some_windows_testsuite_failures' into 'main'
tests: fix some Windows testsuite failures Closes #3370 See merge request GNOME/glib!4125
This commit is contained in:
commit
7878938e9a
@ -840,7 +840,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_gresource = custom_target('test.gresource',
|
||||
input : 'test.gresource.xml',
|
||||
depends : test_generated_txt,
|
||||
depends : [test_generated_txt, gspawn_helpers],
|
||||
output : 'test.gresource',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -855,6 +855,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_resources2_c = custom_target('test_resources2.c',
|
||||
input : 'test3.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test_resources2.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -868,6 +869,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_resources2_h = custom_target('test_resources2.h',
|
||||
input : 'test3.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test_resources2.h',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -881,7 +883,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_resources_c = custom_target('test_resources.c',
|
||||
input : 'test2.gresource.xml',
|
||||
depends : big_test_resource,
|
||||
depends : [big_test_resource, gspawn_helpers],
|
||||
output : 'test_resources.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -895,6 +897,7 @@ if not meson.is_cross_build()
|
||||
|
||||
digit_test_resources_c = custom_target('digit_test_resources.c',
|
||||
input : '111_digit_test.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'digit_test_resources.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -908,6 +911,7 @@ if not meson.is_cross_build()
|
||||
|
||||
digit_test_resources_h = custom_target('digit_test_resources.h',
|
||||
input : '111_digit_test.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'digit_test_resources.h',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -960,6 +964,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_gresource_binary = custom_target('test5.gresource',
|
||||
input : 'test5.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test5.gresource',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -975,6 +980,7 @@ if not meson.is_cross_build()
|
||||
# Create resource data file
|
||||
test_resources_binary_c = custom_target('test_resources_binary.c',
|
||||
input : 'test5.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test_resources_binary.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -1090,7 +1096,7 @@ foreach test_name, extra_args : gio_tests
|
||||
suite = ['gio'] + extra_args.get('suite', [])
|
||||
timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
|
||||
local_test_env = test_env
|
||||
depends = [extra_args.get('depends', [])]
|
||||
depends = [extra_args.get('depends', []), gspawn_helpers]
|
||||
|
||||
foreach program : extra_args.get('extra_programs', [])
|
||||
depends += test_extra_programs_targets[program]
|
||||
|
@ -463,26 +463,30 @@ pkg.generate(libglib,
|
||||
)
|
||||
meson.override_dependency('glib-2.0', libglib_dep)
|
||||
|
||||
# FIXME: This needs to be added to the `depends` of every invocation of
|
||||
# glib_compile_resources in the build process. We can drop this when
|
||||
# https://github.com/mesonbuild/meson/issues/13385 is fixed.
|
||||
gspawn_helpers = []
|
||||
# On Windows, glib needs a spawn helper for g_spawn* API
|
||||
if host_system == 'windows'
|
||||
if host_machine.cpu_family() == 'x86'
|
||||
executable('gspawn-win32-helper', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win32-helper', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
win_subsystem : 'windows',
|
||||
include_directories : configinc,
|
||||
dependencies : [libglib_dep])
|
||||
executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
c_args : ['-DHELPER_CONSOLE'],
|
||||
include_directories : configinc,
|
||||
dependencies : [libglib_dep])
|
||||
else
|
||||
executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
win_subsystem : 'windows',
|
||||
include_directories : configinc,
|
||||
dependencies : [libglib_dep])
|
||||
executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
c_args : ['-DHELPER_CONSOLE'],
|
||||
include_directories : configinc,
|
||||
|
@ -453,7 +453,7 @@ foreach test_name, extra_args : glib_tests
|
||||
install: install,
|
||||
)
|
||||
|
||||
depends = [extra_args.get('depends', [])]
|
||||
depends = [extra_args.get('depends', []), gspawn_helpers]
|
||||
suite = ['glib', 'core'] + extra_args.get('suite', [])
|
||||
timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user