mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 14:06:15 +01:00
Merge branch 'socketclient-slow-install-preload-library' into 'master'
tests: Install the slow-connect-preload.so library and use it See merge request GNOME/glib!651
This commit is contained in:
commit
95899c11d9
@ -140,11 +140,16 @@ if host_machine.system() != 'windows'
|
||||
'slow-connect-preload.c',
|
||||
name_prefix : '',
|
||||
dependencies: cc.find_library('dl'),
|
||||
install_dir : installed_tests_execdir,
|
||||
install: installed_tests_enabled,
|
||||
)
|
||||
],
|
||||
'env' : {
|
||||
'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir())
|
||||
},
|
||||
'installed_tests_env' : {
|
||||
'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(installed_tests_execdir),
|
||||
},
|
||||
'suite': ['flaky'],
|
||||
},
|
||||
'gschema-compile' : {'install' : false},
|
||||
@ -593,11 +598,21 @@ foreach test_name, extra_args : gio_tests
|
||||
source = extra_args.get('source', test_name + '.c')
|
||||
extra_sources = extra_args.get('extra_sources', [])
|
||||
install = installed_tests_enabled and extra_args.get('install', true)
|
||||
installed_tests_env = extra_args.get('installed_tests_env', {})
|
||||
|
||||
if install
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', test_name)
|
||||
test_env_override = ''
|
||||
if installed_tests_env != {}
|
||||
envs = []
|
||||
foreach var, value : installed_tests_env
|
||||
envs += '@0@=@1@'.format(var, value)
|
||||
endforeach
|
||||
test_env_override = '@0@ @1@ '.format(env_program.path(), ' '.join(envs))
|
||||
endif
|
||||
test_conf.set('env', test_env_override)
|
||||
configure_file(
|
||||
input: installed_tests_template_tap,
|
||||
output: test_name + '.test',
|
||||
|
@ -183,6 +183,7 @@ foreach test_name, extra_args : glib_tests
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', test_name)
|
||||
test_conf.set('env', '')
|
||||
configure_file(
|
||||
input: installed_tests_template_tap,
|
||||
output: test_name + '.test',
|
||||
|
@ -77,6 +77,7 @@ foreach test_name, extra_args : gobject_tests
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', test_name)
|
||||
test_conf.set('env', '')
|
||||
configure_file(
|
||||
input: installed_tests_template_tap,
|
||||
output: test_name + '.test',
|
||||
|
@ -1893,6 +1893,9 @@ endif
|
||||
have_bash = find_program('bash', required : false).found() # For completion scripts
|
||||
have_sh = find_program('sh', required : false).found() # For glib-gettextize
|
||||
|
||||
# Some installed tests require a custom environment
|
||||
env_program = find_program('env', required: installed_tests_enabled)
|
||||
|
||||
# FIXME: How to detect Solaris? https://github.com/mesonbuild/meson/issues/1578
|
||||
if host_system == 'sunos'
|
||||
glib_conf.set('_XOPEN_SOURCE_EXTENDED', 1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
[Test]
|
||||
Type=session
|
||||
Exec=@installed_tests_dir@/@program@ --tap
|
||||
Exec=@env@@installed_tests_dir@/@program@ --tap
|
||||
Output=TAP
|
||||
|
@ -66,6 +66,7 @@ foreach test_name, extra_args : gobject_tests
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', test_name)
|
||||
test_conf.set('env', '')
|
||||
configure_file(
|
||||
input: template,
|
||||
output: test_name + '.test',
|
||||
|
@ -109,6 +109,7 @@ foreach test_name, extra_args : tests
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', test_name)
|
||||
test_conf.set('env', '')
|
||||
configure_file(
|
||||
input: template,
|
||||
output: test_name + '.test',
|
||||
|
@ -36,6 +36,7 @@ foreach test_name, extra_args : refcount_tests
|
||||
test_conf = configuration_data()
|
||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||
test_conf.set('program', test_name)
|
||||
test_conf.set('env', '')
|
||||
configure_file(
|
||||
input: installed_tests_template,
|
||||
output: test_name + '.test',
|
||||
|
Loading…
Reference in New Issue
Block a user