mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 17:08:53 +02: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:
@@ -140,11 +140,16 @@ if host_machine.system() != 'windows'
|
|||||||
'slow-connect-preload.c',
|
'slow-connect-preload.c',
|
||||||
name_prefix : '',
|
name_prefix : '',
|
||||||
dependencies: cc.find_library('dl'),
|
dependencies: cc.find_library('dl'),
|
||||||
|
install_dir : installed_tests_execdir,
|
||||||
|
install: installed_tests_enabled,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
'env' : {
|
'env' : {
|
||||||
'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir())
|
'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'],
|
'suite': ['flaky'],
|
||||||
},
|
},
|
||||||
'gschema-compile' : {'install' : false},
|
'gschema-compile' : {'install' : false},
|
||||||
@@ -593,11 +598,21 @@ foreach test_name, extra_args : gio_tests
|
|||||||
source = extra_args.get('source', test_name + '.c')
|
source = extra_args.get('source', test_name + '.c')
|
||||||
extra_sources = extra_args.get('extra_sources', [])
|
extra_sources = extra_args.get('extra_sources', [])
|
||||||
install = installed_tests_enabled and extra_args.get('install', true)
|
install = installed_tests_enabled and extra_args.get('install', true)
|
||||||
|
installed_tests_env = extra_args.get('installed_tests_env', {})
|
||||||
|
|
||||||
if install
|
if install
|
||||||
test_conf = configuration_data()
|
test_conf = configuration_data()
|
||||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||||
test_conf.set('program', test_name)
|
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(
|
configure_file(
|
||||||
input: installed_tests_template_tap,
|
input: installed_tests_template_tap,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
|
@@ -183,6 +183,7 @@ foreach test_name, extra_args : glib_tests
|
|||||||
test_conf = configuration_data()
|
test_conf = configuration_data()
|
||||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||||
test_conf.set('program', test_name)
|
test_conf.set('program', test_name)
|
||||||
|
test_conf.set('env', '')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: installed_tests_template_tap,
|
input: installed_tests_template_tap,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
|
@@ -77,6 +77,7 @@ foreach test_name, extra_args : gobject_tests
|
|||||||
test_conf = configuration_data()
|
test_conf = configuration_data()
|
||||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||||
test_conf.set('program', test_name)
|
test_conf.set('program', test_name)
|
||||||
|
test_conf.set('env', '')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: installed_tests_template_tap,
|
input: installed_tests_template_tap,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
|
@@ -1893,6 +1893,9 @@ endif
|
|||||||
have_bash = find_program('bash', required : false).found() # For completion scripts
|
have_bash = find_program('bash', required : false).found() # For completion scripts
|
||||||
have_sh = find_program('sh', required : false).found() # For glib-gettextize
|
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
|
# FIXME: How to detect Solaris? https://github.com/mesonbuild/meson/issues/1578
|
||||||
if host_system == 'sunos'
|
if host_system == 'sunos'
|
||||||
glib_conf.set('_XOPEN_SOURCE_EXTENDED', 1)
|
glib_conf.set('_XOPEN_SOURCE_EXTENDED', 1)
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
[Test]
|
[Test]
|
||||||
Type=session
|
Type=session
|
||||||
Exec=@installed_tests_dir@/@program@ --tap
|
Exec=@env@@installed_tests_dir@/@program@ --tap
|
||||||
Output=TAP
|
Output=TAP
|
||||||
|
@@ -66,6 +66,7 @@ foreach test_name, extra_args : gobject_tests
|
|||||||
test_conf = configuration_data()
|
test_conf = configuration_data()
|
||||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||||
test_conf.set('program', test_name)
|
test_conf.set('program', test_name)
|
||||||
|
test_conf.set('env', '')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: template,
|
input: template,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
|
@@ -109,6 +109,7 @@ foreach test_name, extra_args : tests
|
|||||||
test_conf = configuration_data()
|
test_conf = configuration_data()
|
||||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||||
test_conf.set('program', test_name)
|
test_conf.set('program', test_name)
|
||||||
|
test_conf.set('env', '')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: template,
|
input: template,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
|
@@ -36,6 +36,7 @@ foreach test_name, extra_args : refcount_tests
|
|||||||
test_conf = configuration_data()
|
test_conf = configuration_data()
|
||||||
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
test_conf.set('installed_tests_dir', installed_tests_execdir)
|
||||||
test_conf.set('program', test_name)
|
test_conf.set('program', test_name)
|
||||||
|
test_conf.set('env', '')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: installed_tests_template,
|
input: installed_tests_template,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
|
Reference in New Issue
Block a user