mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 13:53:06 +02:00
Merge branch 'meson-test-cleanup' into 'master'
Meson: Cleanup a FIXME now that we have dict addition See merge request GNOME/glib!418
This commit is contained in:
commit
09799a8b25
@ -4,9 +4,6 @@ glib_tests = {
|
|||||||
'atomic' : {
|
'atomic' : {
|
||||||
'c_args' : cc.get_id() == 'gcc' ? ['-Wstrict-aliasing=2'] : [],
|
'c_args' : cc.get_id() == 'gcc' ? ['-Wstrict-aliasing=2'] : [],
|
||||||
},
|
},
|
||||||
'autoptr' : {
|
|
||||||
'skip' : cc.get_id() == 'msvc',
|
|
||||||
},
|
|
||||||
'base64' : {},
|
'base64' : {},
|
||||||
'bitlock' : {},
|
'bitlock' : {},
|
||||||
'bookmarkfile' : {},
|
'bookmarkfile' : {},
|
||||||
@ -32,19 +29,10 @@ glib_tests = {
|
|||||||
'source' : ['gwakeuptest.c', '../gwakeup.c'],
|
'source' : ['gwakeuptest.c', '../gwakeup.c'],
|
||||||
'install' : false,
|
'install' : false,
|
||||||
},
|
},
|
||||||
'gwakeup-fallback' : {
|
|
||||||
'skip' : not glib_conf.has('HAVE_EVENTFD'),
|
|
||||||
'source' : ['gwakeuptest.c', '../gwakeup.c'],
|
|
||||||
'c_args' : ['-DTEST_EVENTFD_FALLBACK'],
|
|
||||||
'install' : false,
|
|
||||||
},
|
|
||||||
'hash' : {},
|
'hash' : {},
|
||||||
'hmac' : {},
|
'hmac' : {},
|
||||||
'hook' : {},
|
'hook' : {},
|
||||||
'hostutils' : {},
|
'hostutils' : {},
|
||||||
'include' : {
|
|
||||||
'skip' : host_machine.system() == 'windows',
|
|
||||||
},
|
|
||||||
'keyfile' : {},
|
'keyfile' : {},
|
||||||
'list' : {},
|
'list' : {},
|
||||||
'logging' : {},
|
'logging' : {},
|
||||||
@ -109,9 +97,6 @@ glib_tests = {
|
|||||||
'utf8-misc' : {},
|
'utf8-misc' : {},
|
||||||
'utils' : {},
|
'utils' : {},
|
||||||
'unicode' : {},
|
'unicode' : {},
|
||||||
'unix' : {
|
|
||||||
'skip' : host_machine.system() == 'windows',
|
|
||||||
},
|
|
||||||
'uri' : {},
|
'uri' : {},
|
||||||
'1bit-mutex' : {},
|
'1bit-mutex' : {},
|
||||||
'1bit-emufutex' : {
|
'1bit-emufutex' : {
|
||||||
@ -130,6 +115,27 @@ glib_tests = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if cc.get_id() != 'msvc'
|
||||||
|
glib_tests += {'autoptr' : {}}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if glib_conf.has('HAVE_EVENTFD')
|
||||||
|
glib_tests += {
|
||||||
|
'gwakeup-fallback' : {
|
||||||
|
'source' : ['gwakeuptest.c', '../gwakeup.c'],
|
||||||
|
'c_args' : ['-DTEST_EVENTFD_FALLBACK'],
|
||||||
|
'install' : false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
|
if host_machine.system() != 'windows'
|
||||||
|
glib_tests += {
|
||||||
|
'include' : {},
|
||||||
|
'unix' : {},
|
||||||
|
}
|
||||||
|
endif
|
||||||
|
|
||||||
if installed_tests_enabled
|
if installed_tests_enabled
|
||||||
install_data(
|
install_data(
|
||||||
'keyfiletest.ini',
|
'keyfiletest.ini',
|
||||||
@ -159,37 +165,32 @@ test_deps = [libm, thread_dep, libglib_dep]
|
|||||||
test_cargs = ['-DG_LOG_DOMAIN="GLib"']
|
test_cargs = ['-DG_LOG_DOMAIN="GLib"']
|
||||||
|
|
||||||
foreach test_name, extra_args : glib_tests
|
foreach test_name, extra_args : glib_tests
|
||||||
# FIXME: This condition is ugly, meson should either have 'continue'
|
source = extra_args.get('source', test_name + '.c')
|
||||||
# keyword (https://github.com/mesonbuild/meson/issues/3601), or support
|
install = installed_tests_enabled and extra_args.get('install', true)
|
||||||
# mutable to dictionaries (https://github.com/mesonbuild/meson/pull/3820).
|
|
||||||
if not extra_args.get('skip', false)
|
|
||||||
source = extra_args.get('source', test_name + '.c')
|
|
||||||
install = installed_tests_enabled and extra_args.get('install', true)
|
|
||||||
|
|
||||||
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)
|
||||||
configure_file(
|
configure_file(
|
||||||
input: installed_tests_template_tap,
|
input: installed_tests_template_tap,
|
||||||
output: test_name + '.test',
|
output: test_name + '.test',
|
||||||
install_dir: installed_tests_metadir,
|
install_dir: installed_tests_metadir,
|
||||||
configuration: test_conf
|
configuration: test_conf
|
||||||
)
|
|
||||||
endif
|
|
||||||
|
|
||||||
exe = executable(test_name, source,
|
|
||||||
c_args : test_cargs + extra_args.get('c_args', []),
|
|
||||||
dependencies : test_deps + extra_args.get('dependencies', []),
|
|
||||||
install_dir: installed_tests_execdir,
|
|
||||||
install: install,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
suite = ['glib'] + extra_args.get('suite', [])
|
|
||||||
timeout = suite.contains('slow') ? 120 : 30
|
|
||||||
test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
|
|
||||||
args : ['--tap'])
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
exe = executable(test_name, source,
|
||||||
|
c_args : test_cargs + extra_args.get('c_args', []),
|
||||||
|
dependencies : test_deps + extra_args.get('dependencies', []),
|
||||||
|
install_dir: installed_tests_execdir,
|
||||||
|
install: install,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite = ['glib'] + extra_args.get('suite', [])
|
||||||
|
timeout = suite.contains('slow') ? 120 : 30
|
||||||
|
test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
|
||||||
|
args : ['--tap'])
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# test-spawn-echo helper binary required by the spawn tests above
|
# test-spawn-echo helper binary required by the spawn tests above
|
||||||
|
Loading…
x
Reference in New Issue
Block a user