mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 12:41:50 +01:00
Meson: Bump dependency to 0.48.0
This commit is contained in:
parent
4b983e5122
commit
24d7a73b93
@ -19,9 +19,7 @@ giotypefuncs_inc = custom_target(
|
|||||||
command: [gengiotypefuncs_prog, '@OUTPUT@', '@INPUT@'])
|
command: [gengiotypefuncs_prog, '@OUTPUT@', '@INPUT@'])
|
||||||
|
|
||||||
# Test programs buildable on all platforms
|
# Test programs buildable on all platforms
|
||||||
# FIXME: We are using list of dictionnaries until we can depend on Meson 0.48.0
|
gio_tests = {
|
||||||
# that supports '+=' operator on dictionnaries.
|
|
||||||
gio_tests = [{
|
|
||||||
'appmonitor' : {},
|
'appmonitor' : {},
|
||||||
'async-close-output-stream' : {},
|
'async-close-output-stream' : {},
|
||||||
'async-splice-output-stream' : {},
|
'async-splice-output-stream' : {},
|
||||||
@ -73,15 +71,13 @@ gio_tests = [{
|
|||||||
'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']},
|
'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||||
'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
|
'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||||
'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
|
'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
|
||||||
}]
|
}
|
||||||
|
|
||||||
# FIXME: We are using list of dictionnaries until we can depend on Meson 0.48.0
|
test_extra_programs = {
|
||||||
# that supports '+=' operator on dictionnaries.
|
|
||||||
test_extra_programs = [{
|
|
||||||
'gdbus-connection-flush-helper' : {},
|
'gdbus-connection-flush-helper' : {},
|
||||||
'gdbus-testserver' : {},
|
'gdbus-testserver' : {},
|
||||||
'gsubprocess-testprog' : {},
|
'gsubprocess-testprog' : {},
|
||||||
}]
|
}
|
||||||
|
|
||||||
test_env = environment()
|
test_env = environment()
|
||||||
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
||||||
@ -114,17 +110,17 @@ endif
|
|||||||
if dbus1_dep.found()
|
if dbus1_dep.found()
|
||||||
glib_conf.set('HAVE_DBUS1', 1)
|
glib_conf.set('HAVE_DBUS1', 1)
|
||||||
|
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'gdbus-serialization' : {
|
'gdbus-serialization' : {
|
||||||
'extra_sources' : ['gdbus-tests.c'],
|
'extra_sources' : ['gdbus-tests.c'],
|
||||||
'dependencies' : [dbus1_dep],
|
'dependencies' : [dbus1_dep],
|
||||||
}
|
}
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Test programs buildable on UNIX only
|
# Test programs buildable on UNIX only
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'file' : {},
|
'file' : {},
|
||||||
'gdbus-peer' : {'dependencies' : [libgdbus_example_objectmanager_dep]},
|
'gdbus-peer' : {'dependencies' : [libgdbus_example_objectmanager_dep]},
|
||||||
'gdbus-peer-object-manager' : {},
|
'gdbus-peer-object-manager' : {},
|
||||||
@ -137,12 +133,12 @@ if host_machine.system() != 'windows'
|
|||||||
'g-file-info-filesystem-readonly' : {},
|
'g-file-info-filesystem-readonly' : {},
|
||||||
'gschema-compile' : {'install' : false},
|
'gschema-compile' : {'install' : false},
|
||||||
'trash' : {},
|
'trash' : {},
|
||||||
}]
|
}
|
||||||
|
|
||||||
# Uninstalled because of the check-for-executable logic in DesktopAppInfo
|
# Uninstalled because of the check-for-executable logic in DesktopAppInfo
|
||||||
# unable to find the installed executable
|
# unable to find the installed executable
|
||||||
if not glib_have_cocoa
|
if not glib_have_cocoa
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'appinfo' : {
|
'appinfo' : {
|
||||||
'install' : false,
|
'install' : false,
|
||||||
'is_parallel' : false,
|
'is_parallel' : false,
|
||||||
@ -151,22 +147,22 @@ if host_machine.system() != 'windows'
|
|||||||
'install' : false,
|
'install' : false,
|
||||||
'is_parallel' : false,
|
'is_parallel' : false,
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_extra_programs += [{
|
test_extra_programs += {
|
||||||
'basic-application' : {},
|
'basic-application' : {},
|
||||||
'dbus-launch' : {},
|
'dbus-launch' : {},
|
||||||
'appinfo-test' : {},
|
'appinfo-test' : {},
|
||||||
}]
|
}
|
||||||
|
|
||||||
if not glib_have_cocoa
|
if not glib_have_cocoa
|
||||||
test_extra_programs += [{
|
test_extra_programs += {
|
||||||
'apps' : {},
|
'apps' : {},
|
||||||
}]
|
}
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'mimeapps' : {},
|
'mimeapps' : {},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Test programs that need to bring up a session bus (requires dbus-daemon)
|
# Test programs that need to bring up a session bus (requires dbus-daemon)
|
||||||
@ -197,7 +193,7 @@ if host_machine.system() != 'windows'
|
|||||||
|
|
||||||
extra_sources = ['gdbus-sessionbus.c', 'gdbus-tests.c']
|
extra_sources = ['gdbus-sessionbus.c', 'gdbus-tests.c']
|
||||||
|
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'actions' : {
|
'actions' : {
|
||||||
'extra_sources' : extra_sources,
|
'extra_sources' : extra_sources,
|
||||||
'suite' : ['slow'],
|
'suite' : ['slow'],
|
||||||
@ -244,14 +240,14 @@ if host_machine.system() != 'windows'
|
|||||||
},
|
},
|
||||||
'gapplication' : {'extra_sources' : extra_sources},
|
'gapplication' : {'extra_sources' : extra_sources},
|
||||||
'gdbus-unix-addresses' : {},
|
'gdbus-unix-addresses' : {},
|
||||||
}]
|
}
|
||||||
|
|
||||||
if not glib_have_cocoa
|
if not glib_have_cocoa
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'dbus-appinfo' : {
|
'dbus-appinfo' : {
|
||||||
'extra_sources' : extra_sources,
|
'extra_sources' : extra_sources,
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
endif # have_dbus_daemon
|
endif # have_dbus_daemon
|
||||||
|
|
||||||
@ -262,44 +258,44 @@ if host_machine.system() != 'windows'
|
|||||||
install_dir : installed_tests_execdir,
|
install_dir : installed_tests_execdir,
|
||||||
install : installed_tests_enabled)
|
install : installed_tests_enabled)
|
||||||
|
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'gdbus-connection-flush' : {
|
'gdbus-connection-flush' : {
|
||||||
'extra_sources' : ['test-io-stream.c', 'test-pipe-unix.c'],
|
'extra_sources' : ['test-io-stream.c', 'test-pipe-unix.c'],
|
||||||
},
|
},
|
||||||
'gdbus-non-socket' : {
|
'gdbus-non-socket' : {
|
||||||
'extra_sources' : ['gdbus-tests.c', 'test-io-stream.c', 'test-pipe-unix.c'],
|
'extra_sources' : ['gdbus-tests.c', 'test-io-stream.c', 'test-pipe-unix.c'],
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
|
|
||||||
# Generate test.mo from de.po using msgfmt
|
# Generate test.mo from de.po using msgfmt
|
||||||
msgfmt = find_program('msgfmt', required : false)
|
msgfmt = find_program('msgfmt', required : false)
|
||||||
if msgfmt.found()
|
if msgfmt.found()
|
||||||
subdir('de/LC_MESSAGES')
|
subdir('de/LC_MESSAGES')
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'gsettings' : {
|
'gsettings' : {
|
||||||
'extra_sources' : [test_mo],
|
'extra_sources' : [test_mo],
|
||||||
'c_args' : ['-DSRCDIR="@0@"'.format(meson.current_source_dir()),
|
'c_args' : ['-DSRCDIR="@0@"'.format(meson.current_source_dir()),
|
||||||
'-DTEST_LOCALE_PATH="@0@"'.format(test_mo_dir)],
|
'-DTEST_LOCALE_PATH="@0@"'.format(test_mo_dir)],
|
||||||
'install' : false,
|
'install' : false,
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
endif # unix
|
endif # unix
|
||||||
|
|
||||||
# Test programs buildable on Windows only
|
# Test programs buildable on Windows only
|
||||||
if host_machine.system() == 'windows'
|
if host_machine.system() == 'windows'
|
||||||
gio_tests += [{'win32-streams' : {}}]
|
gio_tests += {'win32-streams' : {}}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if cc.get_id() != 'msvc'
|
if cc.get_id() != 'msvc'
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'autoptr-gio' : {
|
'autoptr-gio' : {
|
||||||
'source' : 'autoptr.c',
|
'source' : 'autoptr.c',
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_extra_programs += [{
|
test_extra_programs += {
|
||||||
'gio-du' : {'install' : false},
|
'gio-du' : {'install' : false},
|
||||||
'echo-server' : {'install' : false},
|
'echo-server' : {'install' : false},
|
||||||
'filter-cat' : {'install' : false},
|
'filter-cat' : {'install' : false},
|
||||||
@ -331,10 +327,10 @@ test_extra_programs += [{
|
|||||||
'extra_sources' : ['gtlsconsoleinteraction.c'],
|
'extra_sources' : ['gtlsconsoleinteraction.c'],
|
||||||
'install' : false,
|
'install' : false,
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
|
|
||||||
if cc.get_id() != 'msvc'
|
if cc.get_id() != 'msvc'
|
||||||
test_extra_programs += [{
|
test_extra_programs += {
|
||||||
# These three are manual-run tests because they need a session bus but don't bring one up themselves
|
# 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!
|
# FIXME: these build but don't seem to work!
|
||||||
'gdbus-example-objectmanager-client' : {
|
'gdbus-example-objectmanager-client' : {
|
||||||
@ -349,15 +345,15 @@ if cc.get_id() != 'msvc'
|
|||||||
'dependencies' : [libgdbus_example_objectmanager_dep],
|
'dependencies' : [libgdbus_example_objectmanager_dep],
|
||||||
'install' : false,
|
'install' : false,
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
test_extra_programs += [{
|
test_extra_programs += {
|
||||||
'gdbus-example-unix-fd-client' : {
|
'gdbus-example-unix-fd-client' : {
|
||||||
'install' : false,
|
'install' : false,
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if installed_tests_enabled
|
if installed_tests_enabled
|
||||||
@ -447,63 +443,59 @@ if not meson.is_cross_build() or meson.has_exe_wrapper()
|
|||||||
copy : true,
|
copy : true,
|
||||||
install : false)
|
install : false)
|
||||||
|
|
||||||
gio_tests += [{
|
gio_tests += {
|
||||||
'resources' : {
|
'resources' : {
|
||||||
'extra_sources' : [test_gresource, test_resources_c, test_resources2_c,
|
'extra_sources' : [test_gresource, test_resources_c, test_resources2_c,
|
||||||
test_resources2_h],
|
test_resources2_h],
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
foreach test_dict : gio_tests
|
foreach test_name, extra_args : gio_tests
|
||||||
foreach test_name, extra_args : test_dict
|
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)
|
|
||||||
|
|
||||||
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, extra_sources],
|
|
||||||
c_args : test_c_args + extra_args.get('c_args', []),
|
|
||||||
dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
|
|
||||||
install_dir: installed_tests_execdir,
|
|
||||||
install: install,
|
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
suite = ['gio'] + extra_args.get('suite', [])
|
exe = executable(test_name, [source, extra_sources],
|
||||||
timeout = suite.contains('slow') ? 120 : 30
|
c_args : test_c_args + extra_args.get('c_args', []),
|
||||||
test(test_name, exe,
|
dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
|
||||||
env : test_env,
|
install_dir: installed_tests_execdir,
|
||||||
timeout : timeout,
|
install: install,
|
||||||
suite : suite,
|
)
|
||||||
args : ['--tap'],
|
|
||||||
is_parallel : extra_args.get('is_parallel', true),
|
suite = ['gio'] + extra_args.get('suite', [])
|
||||||
)
|
timeout = suite.contains('slow') ? 120 : 30
|
||||||
endforeach
|
test(test_name, exe,
|
||||||
|
env : test_env,
|
||||||
|
timeout : timeout,
|
||||||
|
suite : suite,
|
||||||
|
args : ['--tap'],
|
||||||
|
is_parallel : extra_args.get('is_parallel', true),
|
||||||
|
)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
foreach program_dict : test_extra_programs
|
foreach program_name, extra_args : test_extra_programs
|
||||||
foreach program_name, extra_args : program_dict
|
source = extra_args.get('source', program_name + '.c')
|
||||||
source = extra_args.get('source', program_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)
|
executable(program_name, [source, extra_sources],
|
||||||
executable(program_name, [source, extra_sources],
|
c_args : test_c_args,
|
||||||
c_args : test_c_args,
|
dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
|
||||||
dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
|
install_dir : installed_tests_execdir,
|
||||||
install_dir : installed_tests_execdir,
|
install : install,
|
||||||
install : install,
|
)
|
||||||
)
|
|
||||||
endforeach
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# FIXME: subdir('services')
|
# FIXME: subdir('services')
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
project('glib', 'c', 'cpp',
|
project('glib', 'c', 'cpp',
|
||||||
version : '2.59.0',
|
version : '2.59.0',
|
||||||
meson_version : '>= 0.47.0',
|
meson_version : '>= 0.48.0',
|
||||||
default_options : [
|
default_options : [
|
||||||
'buildtype=debugoptimized',
|
'buildtype=debugoptimized',
|
||||||
'warning_level=1',
|
'warning_level=1',
|
||||||
|
@ -26,9 +26,7 @@ testmarshal_c = custom_target('testmarshal_c',
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
# FIXME: We are using list of dictionnaries until we can depend on Meson 0.48.0
|
gobject_tests = {
|
||||||
# that supports '+=' operator on dictionnaries.
|
|
||||||
gobject_tests = [{
|
|
||||||
'gvalue-test' : {'tap' : true},
|
'gvalue-test' : {'tap' : true},
|
||||||
'paramspec-test' : {'tap' : true},
|
'paramspec-test' : {'tap' : true},
|
||||||
'deftype' : {},
|
'deftype' : {},
|
||||||
@ -46,51 +44,49 @@ gobject_tests = [{
|
|||||||
'accumulator' : {
|
'accumulator' : {
|
||||||
'extra_sources' : [testmarshal_c, testmarshal_h],
|
'extra_sources' : [testmarshal_c, testmarshal_h],
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
|
|
||||||
if host_system != 'windows'
|
if host_system != 'windows'
|
||||||
gobject_tests += [{
|
gobject_tests += {
|
||||||
'timeloop-closure' : {},
|
'timeloop-closure' : {},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
||||||
common_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
common_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
||||||
|
|
||||||
foreach test_dict : gobject_tests
|
foreach test_name, extra_args : gobject_tests
|
||||||
foreach test_name, extra_args : test_dict
|
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)
|
template = extra_args.get('tap', false) ? installed_tests_template_tap : installed_tests_template
|
||||||
template = extra_args.get('tap', false) ? installed_tests_template_tap : installed_tests_template
|
test_command_args = extra_args.get('tap', false) ? ['--tap'] : []
|
||||||
test_command_args = extra_args.get('tap', false) ? ['--tap'] : []
|
|
||||||
|
|
||||||
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: template,
|
input: template,
|
||||||
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
|
|
||||||
|
|
||||||
# FIXME? $(GLIB_DEBUG_FLAGS)
|
|
||||||
exe = executable(test_name, [source, extra_sources],
|
|
||||||
c_args : common_c_args + extra_args.get('c_args', []),
|
|
||||||
dependencies : common_deps + extra_args.get('dependencies', []),
|
|
||||||
install_dir: installed_tests_execdir,
|
|
||||||
install: install,
|
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
suite = ['gobject'] + extra_args.get('suite', [])
|
# FIXME? $(GLIB_DEBUG_FLAGS)
|
||||||
timeout = suite.contains('slow') ? 120 : 30
|
exe = executable(test_name, [source, extra_sources],
|
||||||
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
c_args : common_c_args + extra_args.get('c_args', []),
|
||||||
test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
|
dependencies : common_deps + extra_args.get('dependencies', []),
|
||||||
args : test_command_args)
|
install_dir: installed_tests_execdir,
|
||||||
endforeach
|
install: install,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite = ['gobject'] + extra_args.get('suite', [])
|
||||||
|
timeout = suite.contains('slow') ? 120 : 30
|
||||||
|
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
||||||
|
test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
|
||||||
|
args : test_command_args)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# Don't install these ones, and keep them out of 'make check' because they take too long...
|
# Don't install these ones, and keep them out of 'make check' because they take too long...
|
||||||
|
@ -15,9 +15,7 @@ test_cargs = ['-DG_LOG_DOMAIN="GLib"']
|
|||||||
subdir('gobject')
|
subdir('gobject')
|
||||||
subdir('refcount')
|
subdir('refcount')
|
||||||
|
|
||||||
# FIXME: We are using list of dictionnaries until we can depend on Meson 0.48.0
|
tests = {
|
||||||
# that supports '+=' operator on dictionnaries.
|
|
||||||
tests = [{
|
|
||||||
'testglib' : {'tap' : true},
|
'testglib' : {'tap' : true},
|
||||||
'testgdate' : {},
|
'testgdate' : {},
|
||||||
'datetime' : {},
|
'datetime' : {},
|
||||||
@ -54,7 +52,7 @@ tests = [{
|
|||||||
'include_directories' : gmoduleinc,
|
'include_directories' : gmoduleinc,
|
||||||
'dependencies' : [libgio_dep],
|
'dependencies' : [libgio_dep],
|
||||||
},
|
},
|
||||||
}]
|
}
|
||||||
|
|
||||||
test_extra_programs = {
|
test_extra_programs = {
|
||||||
'slice-test' : {
|
'slice-test' : {
|
||||||
@ -68,11 +66,11 @@ test_extra_programs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
tests += [{
|
tests += {
|
||||||
'timeloop' : {},
|
'timeloop' : {},
|
||||||
'spawn-test' : {},
|
'spawn-test' : {},
|
||||||
'iochannel-test' : {},
|
'iochannel-test' : {},
|
||||||
}]
|
}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if installed_tests_enabled
|
if installed_tests_enabled
|
||||||
@ -96,42 +94,40 @@ endforeach
|
|||||||
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
common_c_args = test_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS']
|
||||||
common_deps = [libm, thread_dep, libglib_dep]
|
common_deps = [libm, thread_dep, libglib_dep]
|
||||||
|
|
||||||
foreach test_dict : tests
|
foreach test_name, extra_args : tests
|
||||||
foreach test_name, extra_args : test_dict
|
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)
|
template = extra_args.get('tap', false) ? installed_tests_template_tap : installed_tests_template
|
||||||
template = extra_args.get('tap', false) ? installed_tests_template_tap : installed_tests_template
|
test_command_args = extra_args.get('tap', false) ? ['--tap'] : []
|
||||||
test_command_args = extra_args.get('tap', false) ? ['--tap'] : []
|
|
||||||
|
|
||||||
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: template,
|
input: template,
|
||||||
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
|
|
||||||
|
|
||||||
# FIXME? $(GLIB_DEBUG_FLAGS)
|
|
||||||
exe = executable(test_name, [source, extra_sources],
|
|
||||||
c_args : common_c_args + extra_args.get('c_args', []),
|
|
||||||
dependencies : common_deps + extra_args.get('dependencies', []),
|
|
||||||
export_dynamic : extra_args.get('export_dynamic', false),
|
|
||||||
include_directories : extra_args.get('include_directories', []),
|
|
||||||
install_dir: installed_tests_execdir,
|
|
||||||
install: install,
|
|
||||||
)
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
suite = ['glib'] + extra_args.get('suite', [])
|
# FIXME? $(GLIB_DEBUG_FLAGS)
|
||||||
timeout = suite.contains('slow') ? 120 : 30
|
exe = executable(test_name, [source, extra_sources],
|
||||||
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
c_args : common_c_args + extra_args.get('c_args', []),
|
||||||
test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
|
dependencies : common_deps + extra_args.get('dependencies', []),
|
||||||
args : test_command_args)
|
export_dynamic : extra_args.get('export_dynamic', false),
|
||||||
endforeach
|
include_directories : extra_args.get('include_directories', []),
|
||||||
|
install_dir: installed_tests_execdir,
|
||||||
|
install: install,
|
||||||
|
)
|
||||||
|
|
||||||
|
suite = ['glib'] + extra_args.get('suite', [])
|
||||||
|
timeout = suite.contains('slow') ? 120 : 30
|
||||||
|
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
||||||
|
test(test_name, exe, env : test_env, timeout : timeout, suite : suite,
|
||||||
|
args : test_command_args)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
foreach program_name, extra_args : test_extra_programs
|
foreach program_name, extra_args : test_extra_programs
|
||||||
|
Loading…
Reference in New Issue
Block a user