2018-04-20 18:09:32 +02:00
|
|
|
common_gio_tests_deps = [
|
|
|
|
libglib_dep,
|
|
|
|
libgmodule_dep,
|
|
|
|
libgobject_dep,
|
|
|
|
libgio_dep,
|
|
|
|
]
|
2017-12-11 02:33:24 +01:00
|
|
|
|
2017-01-28 13:52:18 +01:00
|
|
|
subdir('gdbus-object-manager-example')
|
|
|
|
|
|
|
|
gengiotypefuncs_prog = find_program('gengiotypefuncs.py')
|
|
|
|
giotypefuncs_inc = custom_target(
|
|
|
|
'giotypefuncs.inc',
|
|
|
|
output : 'giotypefuncs.inc',
|
|
|
|
input : gio_headers + [gioenumtypes_h] + gobject_install_headers,
|
|
|
|
command: [gengiotypefuncs_prog, '@OUTPUT@', '@INPUT@'])
|
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
# Test programs buildable on all platforms
|
|
|
|
gio_tests = [
|
|
|
|
'appmonitor',
|
|
|
|
'async-close-output-stream',
|
|
|
|
'async-splice-output-stream',
|
|
|
|
'buffered-input-stream',
|
|
|
|
'buffered-output-stream',
|
|
|
|
'cancellable',
|
|
|
|
'contexts',
|
|
|
|
'contenttype',
|
|
|
|
'converter-stream',
|
|
|
|
'credentials',
|
|
|
|
'data-input-stream',
|
|
|
|
'data-output-stream',
|
2017-01-28 13:52:18 +01:00
|
|
|
'defaultvalue',
|
2016-03-07 12:13:24 +01:00
|
|
|
'fileattributematcher',
|
|
|
|
'filter-streams',
|
|
|
|
'giomodule',
|
|
|
|
'gsubprocess',
|
|
|
|
'g-file',
|
|
|
|
'g-file-info',
|
|
|
|
'g-icon',
|
|
|
|
'gdbus-addresses',
|
|
|
|
'gdbus-message',
|
|
|
|
'inet-address',
|
|
|
|
'io-stream',
|
|
|
|
'memory-input-stream',
|
|
|
|
'memory-output-stream',
|
|
|
|
'monitor',
|
2018-06-19 16:46:59 +02:00
|
|
|
'mount-operation',
|
2016-03-07 12:13:24 +01:00
|
|
|
'network-address',
|
|
|
|
'network-monitor',
|
2018-04-10 17:27:00 +02:00
|
|
|
'network-monitor-race',
|
2016-03-07 12:13:24 +01:00
|
|
|
'permission',
|
|
|
|
'pollable',
|
|
|
|
'proxy-test',
|
|
|
|
'readwrite',
|
|
|
|
'simple-async-result',
|
|
|
|
'simple-proxy',
|
|
|
|
'sleepy-stream',
|
|
|
|
'socket',
|
|
|
|
'socket-listener',
|
|
|
|
'socket-service',
|
|
|
|
'srvtarget',
|
|
|
|
'task',
|
|
|
|
'vfs',
|
|
|
|
'volumemonitor',
|
|
|
|
'glistmodel',
|
|
|
|
'testfilemonitor',
|
2017-01-28 13:52:18 +01:00
|
|
|
'thumbnail-verification',
|
2018-07-06 15:58:25 +02:00
|
|
|
'tls-certificate',
|
|
|
|
'tls-interaction',
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
2018-07-05 18:14:53 +02:00
|
|
|
slow_tests = [
|
|
|
|
'actions',
|
|
|
|
'gdbus-export',
|
2018-07-06 16:01:40 +02:00
|
|
|
'gdbus-threading',
|
2018-07-05 18:14:53 +02:00
|
|
|
'testfilemonitor',
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
|
|
|
|
2017-01-28 13:52:18 +01:00
|
|
|
test_extra_programs = [
|
|
|
|
['gdbus-connection-flush-helper'],
|
|
|
|
['gdbus-testserver'],
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
|
|
|
|
2018-07-16 17:52:53 +02:00
|
|
|
test_env = environment()
|
|
|
|
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
|
|
|
|
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
|
|
|
|
test_env.set('GIO_MODULE_DIR', '')
|
|
|
|
test_env.set('GIO_LAUNCH_DESKTOP', meson.build_root() + '/gio/gio-launch-desktop')
|
2017-02-23 17:13:23 +01:00
|
|
|
|
|
|
|
test_c_args = [
|
|
|
|
'-DG_LOG_DOMAIN="GLib-GIO"',
|
|
|
|
'-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
|
2017-02-24 10:46:36 +01:00
|
|
|
'-DGLIB_MKENUMS="@0@"'.format(glib_mkenums),
|
|
|
|
'-DGLIB_COMPILE_SCHEMAS="@0@"'.format(glib_compile_schemas.full_path()),
|
2017-02-23 17:13:23 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
# Check for libdbus1 - Optional - is only used in the GDBus test cases
|
|
|
|
# 1.2.14 required for dbus_message_set_serial
|
|
|
|
dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14')
|
2017-08-15 11:08:47 +02:00
|
|
|
if not dbus1_dep.found()
|
|
|
|
if cc.get_id() == 'msvc'
|
|
|
|
# MSVC: Search for the DBus library by the configuration, which corresponds
|
|
|
|
# to the output of CMake builds of DBus. Note that debugoptimized
|
|
|
|
# is really a Release build with .PDB files.
|
|
|
|
if buildtype == 'debug'
|
|
|
|
dbus1_dep = cc.find_library('dbus-1d', required : false)
|
|
|
|
else
|
|
|
|
dbus1_dep = cc.find_library('dbus-1', required : false)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
2017-02-23 17:13:23 +01:00
|
|
|
if dbus1_dep.found()
|
|
|
|
glib_conf.set('HAVE_DBUS1', 1)
|
|
|
|
|
|
|
|
exe = executable('gdbus-serialization',
|
|
|
|
'gdbus-serialization.c', 'gdbus-tests.c',
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps + [dbus1_dep])
|
2018-06-10 16:33:06 +02:00
|
|
|
test('gdbus-serialization', exe, env : test_env, suite : ['gio'])
|
2017-02-23 17:13:23 +01:00
|
|
|
endif
|
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
# Test programs buildable on UNIX only
|
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
gio_tests += [
|
|
|
|
'file',
|
2017-01-28 13:52:18 +01:00
|
|
|
'gdbus-peer',
|
2016-03-07 12:13:24 +01:00
|
|
|
'gdbus-peer-object-manager',
|
|
|
|
'live-g-file',
|
|
|
|
'socket-address',
|
|
|
|
'stream-rw_all',
|
|
|
|
'unix-fd',
|
2017-10-25 16:03:17 +02:00
|
|
|
'unix-mounts',
|
2016-03-07 12:13:24 +01:00
|
|
|
'unix-streams',
|
2017-09-09 13:07:15 +02:00
|
|
|
'g-file-info-filesystem-readonly',
|
2017-02-24 10:46:36 +01:00
|
|
|
'gschema-compile',
|
2018-06-05 09:09:12 +02:00
|
|
|
'trash',
|
2017-02-24 10:46:36 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
# Uninstalled because of the check-for-executable logic in DesktopAppInfo
|
|
|
|
# unable to find the installed executable
|
2017-05-13 12:10:52 +02:00
|
|
|
if not glib_have_cocoa
|
|
|
|
gio_tests += [
|
|
|
|
'appinfo',
|
|
|
|
'desktop-app-info',
|
|
|
|
]
|
|
|
|
endif
|
2017-01-28 13:52:18 +01:00
|
|
|
|
|
|
|
test_extra_programs += [
|
|
|
|
['basic-application'],
|
|
|
|
['dbus-launch'],
|
|
|
|
['appinfo-test'],
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
2017-01-28 13:52:18 +01:00
|
|
|
|
2017-05-13 12:10:52 +02:00
|
|
|
if not glib_have_cocoa
|
|
|
|
test_extra_programs += [['apps']]
|
|
|
|
gio_tests += ['mimeapps']
|
|
|
|
endif
|
|
|
|
|
2017-02-23 17:13:23 +01:00
|
|
|
# Test programs that need to bring up a session bus (requires dbus-daemon)
|
2017-01-28 13:52:18 +01:00
|
|
|
have_dbus_daemon = find_program('dbus-daemon', required : false).found()
|
|
|
|
if have_dbus_daemon
|
2017-02-23 17:13:23 +01:00
|
|
|
# Generate gdbus-test-codegen-generated.{c,h}
|
|
|
|
gdbus_test_codegen_generated = custom_target('gdbus-test-codegen-generated',
|
|
|
|
input : ['test-codegen.xml'],
|
|
|
|
output : ['gdbus-test-codegen-generated.h',
|
|
|
|
'gdbus-test-codegen-generated.c'],
|
2017-10-11 12:36:58 +02:00
|
|
|
depend_files : gdbus_codegen_built_files,
|
2017-02-23 17:13:23 +01:00
|
|
|
command : [python, gdbus_codegen,
|
|
|
|
'--interface-prefix', 'org.project.',
|
2017-07-14 04:22:16 +02:00
|
|
|
'--output-directory', '@OUTDIR@',
|
|
|
|
'--generate-c-code', 'gdbus-test-codegen-generated',
|
2017-02-23 17:13:23 +01:00
|
|
|
'--c-generate-object-manager',
|
|
|
|
'--c-namespace', 'Foo_iGen',
|
|
|
|
'--generate-docbook', 'gdbus-test-codegen-generated-doc',
|
|
|
|
'--annotate', 'org.project.Bar', 'Key1', 'Value1',
|
|
|
|
'--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
|
|
|
|
'--annotate', 'org.project.Bar.HelloWorld()', 'Key3', 'Value3',
|
|
|
|
'--annotate', 'org.project.Bar::TestSignal', 'Key4', 'Value4',
|
|
|
|
'--annotate', 'org.project.Bar:ay', 'Key5', 'Value5',
|
|
|
|
'--annotate', 'org.project.Bar.TestPrimitiveTypes()[val_int32]', 'Key6', 'Value6',
|
|
|
|
'--annotate', 'org.project.Bar.TestPrimitiveTypes()[ret_uint32]', 'Key7', 'Value7',
|
|
|
|
'--annotate', 'org.project.Bar::TestSignal[array_of_strings]', 'Key8', 'Value8',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
gio_dbus_tests = [
|
|
|
|
['actions', [], []],
|
|
|
|
['gdbus-auth', [], []],
|
|
|
|
['gdbus-bz627724', [], []],
|
|
|
|
['gdbus-close-pending', [], []],
|
|
|
|
['gdbus-connection', [], []],
|
|
|
|
['gdbus-connection-loss', [], []],
|
|
|
|
['gdbus-connection-slow', [], []],
|
|
|
|
['gdbus-error', [], []],
|
|
|
|
['gdbus-exit-on-close', [], []],
|
|
|
|
['gdbus-export', [], []],
|
|
|
|
['gdbus-introspection', [], []],
|
|
|
|
['gdbus-names', [], []],
|
|
|
|
['gdbus-proxy', [], []],
|
|
|
|
['gdbus-proxy-threads', [], [dbus1_dep]],
|
|
|
|
['gdbus-proxy-well-known-name', [], []],
|
|
|
|
['gdbus-test-codegen', [gdbus_test_codegen_generated], []],
|
|
|
|
['gdbus-threading', [], []],
|
|
|
|
['gmenumodel', [], []],
|
|
|
|
['gnotification', ['gnotification-server.c'], []],
|
|
|
|
]
|
|
|
|
|
2017-05-13 12:10:52 +02:00
|
|
|
if not glib_have_cocoa
|
2018-07-05 14:14:54 +02:00
|
|
|
gio_dbus_tests += [['dbus-appinfo', [], []]]
|
2017-05-13 12:10:52 +02:00
|
|
|
endif
|
|
|
|
|
2017-02-23 17:13:23 +01:00
|
|
|
# separate loop because extra source files for each test
|
|
|
|
foreach dbus_test : gio_dbus_tests
|
|
|
|
test_name = dbus_test[0]
|
|
|
|
extra_src = dbus_test[1]
|
|
|
|
extra_deps = dbus_test[2]
|
|
|
|
exe = executable(test_name, '@0@.c'.format(test_name),
|
|
|
|
'gdbus-sessionbus.c', 'gdbus-tests.c', extra_src,
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps + extra_deps)
|
2018-07-05 18:14:53 +02:00
|
|
|
# These tests may take more than 30 seconds to run on the CI infrastructure
|
|
|
|
if slow_tests.contains(test_name)
|
|
|
|
test(test_name, exe, env : test_env, timeout : 120, suite : ['gio', 'slow'])
|
2018-07-05 14:26:22 +02:00
|
|
|
else
|
|
|
|
test(test_name, exe, env : test_env, suite : ['gio'])
|
|
|
|
endif
|
2017-02-23 17:13:23 +01:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
exe = executable('gdbus-test-codegen-old', 'gdbus-test-codegen.c',
|
|
|
|
'gdbus-sessionbus.c', 'gdbus-tests.c', gdbus_test_codegen_generated,
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args + ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36', '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36'],
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2018-06-10 16:33:06 +02:00
|
|
|
test('gdbus-test-codegen-old', exe, env : test_env, suite : ['gio'])
|
2017-02-23 17:13:23 +01:00
|
|
|
|
|
|
|
# There is already a gapplication exe target in gio so need to use a
|
|
|
|
# different name for the unit test executable, since we can't have two
|
|
|
|
# targets of the same name even if in different directories
|
|
|
|
# (FIXME: just rename source file to gapplication-test.c)
|
2017-05-13 12:10:52 +02:00
|
|
|
if not glib_have_cocoa
|
|
|
|
exe = executable('gapplication-test', 'gapplication.c',
|
|
|
|
'gdbus-sessionbus.c', 'gdbus-tests.c',
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2017-05-13 12:10:52 +02:00
|
|
|
endif
|
2018-06-10 16:33:06 +02:00
|
|
|
test('gapplication', exe, env : test_env, suite : ['gio'])
|
2017-02-23 17:13:23 +01:00
|
|
|
|
2017-02-24 10:46:36 +01:00
|
|
|
gio_tests += ['gdbus-unix-addresses']
|
|
|
|
endif # have_dbus_daemon
|
|
|
|
|
|
|
|
# This test is currently unreliable
|
|
|
|
executable('gdbus-overflow', 'gdbus-overflow.c',
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2017-02-24 10:46:36 +01:00
|
|
|
|
|
|
|
exe = executable('gdbus-connection-flush', 'gdbus-connection-flush.c',
|
|
|
|
'test-io-stream.c', 'test-pipe-unix.c',
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2018-06-10 16:33:06 +02:00
|
|
|
test('gdbus-connection-flush', exe, env : test_env, suite : ['gio'])
|
2017-02-24 10:46:36 +01:00
|
|
|
|
|
|
|
exe = executable('gdbus-non-socket', 'gdbus-non-socket.c',
|
|
|
|
'gdbus-tests.c', 'test-io-stream.c', 'test-pipe-unix.c',
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2018-06-10 16:33:06 +02:00
|
|
|
test('gdbus-non-socket', exe, env : test_env, suite : ['gio'])
|
2017-02-24 10:46:36 +01:00
|
|
|
|
|
|
|
# Generate test.mo from de.po using msgfmt
|
|
|
|
msgfmt = find_program('msgfmt', required : false)
|
|
|
|
if msgfmt.found()
|
|
|
|
subdir('de/LC_MESSAGES')
|
|
|
|
# gsettings target exe already exists in gio directory
|
|
|
|
exe = executable('gsettings-test', 'gsettings.c', test_mo,
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args + [
|
|
|
|
'-DSRCDIR="@0@"'.format(meson.current_source_dir()),
|
|
|
|
'-DTEST_LOCALE_PATH="@0@"'.format(test_mo_dir),
|
|
|
|
],
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2018-06-10 16:33:06 +02:00
|
|
|
test('gsettings', exe, env : test_env, suite : ['gio'])
|
2017-01-28 13:52:18 +01:00
|
|
|
endif
|
2017-02-24 10:46:36 +01:00
|
|
|
endif # unix
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-02-23 17:13:23 +01:00
|
|
|
# Test programs buildable on Windows only
|
|
|
|
if host_machine.system() == 'windows'
|
|
|
|
gio_tests += ['win32-streams']
|
|
|
|
endif
|
|
|
|
|
2016-12-29 03:39:44 +01:00
|
|
|
if cc.get_id() != 'msvc'
|
2016-03-07 12:13:24 +01:00
|
|
|
gio_tests += [ 'autoptr' ]
|
|
|
|
endif
|
|
|
|
|
|
|
|
foreach test_name : gio_tests
|
2017-01-28 13:52:18 +01:00
|
|
|
extra_deps = []
|
|
|
|
srcs = ['@0@.c'.format(test_name)]
|
2016-03-07 12:13:24 +01:00
|
|
|
# conflicts with glib/tests/autoptr, can't have two targets with same name
|
|
|
|
if test_name == 'autoptr'
|
|
|
|
test_name = 'autoptr-gio'
|
2017-01-28 13:52:18 +01:00
|
|
|
elif test_name == 'defaultvalue'
|
|
|
|
srcs += [giotypefuncs_inc]
|
|
|
|
elif test_name == 'gdbus-peer'
|
|
|
|
# This is peer to peer so it doesn't need a session bus, so we can run
|
|
|
|
# it automatically as a test by default
|
|
|
|
extra_deps = [libgdbus_example_objectmanager_dep]
|
2018-07-06 15:58:25 +02:00
|
|
|
elif test_name == 'tls-certificate' or test_name == 'tls-interaction'
|
|
|
|
srcs += ['gtesttlsbackend.c']
|
2016-03-07 12:13:24 +01:00
|
|
|
endif
|
2017-01-28 13:52:18 +01:00
|
|
|
exe = executable(test_name, srcs,
|
2016-03-07 12:13:24 +01:00
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps + extra_deps)
|
2018-07-05 18:14:53 +02:00
|
|
|
# These tests may take more than 30 seconds to run on the CI infrastructure
|
|
|
|
if slow_tests.contains(test_name)
|
|
|
|
test(test_name, exe, env : test_env, timeout : 120, suite : ['gio', 'slow'])
|
2016-03-07 12:13:24 +01:00
|
|
|
else
|
2018-06-10 16:33:06 +02:00
|
|
|
test(test_name, exe, env : test_env, suite : ['gio'])
|
2016-03-07 12:13:24 +01:00
|
|
|
endif
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
uninstalled_test_extra_programs = [
|
2017-01-28 13:52:18 +01:00
|
|
|
['gio-du'],
|
|
|
|
['echo-server'],
|
|
|
|
['filter-cat'],
|
|
|
|
['gapplication-example-actions'],
|
|
|
|
['gapplication-example-cmdline'],
|
|
|
|
['gapplication-example-cmdline2'],
|
|
|
|
['gapplication-example-cmdline3'],
|
2017-12-28 08:39:21 +01:00
|
|
|
['gapplication-example-cmdline4'],
|
2017-01-28 13:52:18 +01:00
|
|
|
['gapplication-example-dbushooks'],
|
|
|
|
['gapplication-example-open'],
|
|
|
|
['gdbus-daemon', gdbus_daemon_sources],
|
|
|
|
['gdbus-example-export'],
|
|
|
|
['gdbus-example-own-name'],
|
|
|
|
['gdbus-example-peer'],
|
|
|
|
['gdbus-example-proxy-subclass'],
|
|
|
|
['gdbus-example-server'],
|
|
|
|
['gdbus-example-subtree'],
|
|
|
|
['gdbus-example-watch-name'],
|
|
|
|
['gdbus-example-watch-proxy'],
|
|
|
|
['gsubprocess-testprog'],
|
|
|
|
['httpd'],
|
|
|
|
['proxy'],
|
|
|
|
['resolver'],
|
|
|
|
['send-data'],
|
|
|
|
['socket-server'],
|
|
|
|
['socket-client', ['gtlsconsoleinteraction.c']],
|
|
|
|
# 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!
|
|
|
|
['gdbus-example-objectmanager-client', [], [libgdbus_example_objectmanager_dep]],
|
|
|
|
['gdbus-example-objectmanager-server', [], [libgdbus_example_objectmanager_dep]],
|
|
|
|
['gdbus-test-fixture', [], [libgdbus_example_objectmanager_dep]],
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
|
|
|
|
2017-01-28 13:52:18 +01:00
|
|
|
if host_machine.system() != 'windows'
|
|
|
|
uninstalled_test_extra_programs += [['gdbus-example-unix-fd-client']]
|
|
|
|
endif
|
|
|
|
|
|
|
|
foreach extra_program : uninstalled_test_extra_programs + test_extra_programs
|
|
|
|
srcs = ['@0@.c'.format(extra_program[0])]
|
|
|
|
if extra_program.length() > 1
|
|
|
|
srcs += extra_program[1]
|
|
|
|
endif
|
|
|
|
extra_deps = []
|
|
|
|
if extra_program.length() > 2
|
|
|
|
extra_deps = extra_program[2]
|
|
|
|
endif
|
|
|
|
executable(extra_program[0], srcs,
|
2016-03-07 12:13:24 +01:00
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps + extra_deps)
|
2016-03-07 12:13:24 +01:00
|
|
|
endforeach
|
|
|
|
|
2017-02-23 01:40:45 +01:00
|
|
|
if not meson.is_cross_build() or meson.has_exe_wrapper()
|
|
|
|
|
|
|
|
plugin_resources_c = custom_target('plugin-resources.c',
|
|
|
|
input : 'test4.gresource.xml',
|
|
|
|
output : 'plugin-resources.c',
|
|
|
|
command : [glib_compile_resources,
|
|
|
|
'--target=@OUTPUT@',
|
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--generate-source',
|
|
|
|
'--c-name', '_g_plugin',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
2017-02-23 17:13:23 +01:00
|
|
|
if host_system == 'windows'
|
|
|
|
resource_plugin_platform_link_args = ['-no-undefined']
|
|
|
|
else
|
|
|
|
resource_plugin_platform_link_args = []
|
|
|
|
endif
|
2017-02-23 01:40:45 +01:00
|
|
|
shared_module ('resourceplugin', 'resourceplugin.c', plugin_resources_c,
|
2018-05-25 19:27:07 +02:00
|
|
|
link_args : export_dynamic_ldflags + resource_plugin_platform_link_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2017-02-23 01:40:45 +01:00
|
|
|
|
|
|
|
test_gresource = custom_target('test.gresource',
|
|
|
|
input : 'test.gresource.xml',
|
|
|
|
output : 'test.gresource',
|
|
|
|
command : [glib_compile_resources,
|
|
|
|
'--target=@OUTPUT@',
|
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--sourcedir=' + meson.current_build_dir(),
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
test_resources2_c = custom_target('test_resources2.c',
|
|
|
|
input : 'test3.gresource.xml',
|
|
|
|
output : 'test_resources2.c',
|
|
|
|
command : [glib_compile_resources,
|
|
|
|
'--target=@OUTPUT@',
|
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--generate',
|
|
|
|
'--c-name', '_g_test2',
|
|
|
|
'--manual-register',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
test_resources2_h = custom_target('test_resources2.h',
|
|
|
|
input : 'test3.gresource.xml',
|
|
|
|
output : 'test_resources2.h',
|
|
|
|
command : [glib_compile_resources,
|
|
|
|
'--target=@OUTPUT@',
|
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--generate',
|
|
|
|
'--c-name', '_g_test2',
|
|
|
|
'--manual-register',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
test_resources_c = custom_target('test_resources.c',
|
|
|
|
input : 'test2.gresource.xml',
|
|
|
|
output : 'test_resources.c',
|
|
|
|
command : [glib_compile_resources,
|
|
|
|
'--target=@OUTPUT@',
|
|
|
|
'--sourcedir=' + meson.current_source_dir(),
|
|
|
|
'--generate-source',
|
|
|
|
'--c-name', '_g_test1',
|
|
|
|
'@INPUT@'])
|
|
|
|
|
|
|
|
# referenced by test.gresource.xml
|
|
|
|
test_generated_txt = configure_file(input : 'test1.txt',
|
|
|
|
output : 'test-generated.txt',
|
2018-07-03 16:47:52 +02:00
|
|
|
copy : true,
|
2017-02-23 01:40:45 +01:00
|
|
|
install : false)
|
|
|
|
|
|
|
|
exe = executable('resources', 'resources.c', test_gresource,
|
|
|
|
test_resources_c, test_resources2_c, test_resources2_h,
|
|
|
|
install : false,
|
|
|
|
c_args : test_c_args,
|
2017-06-04 17:13:21 +02:00
|
|
|
dependencies : common_gio_tests_deps)
|
2018-06-10 16:33:06 +02:00
|
|
|
test('resources', exe, env : test_env, suite : ['gio'])
|
2017-02-23 01:40:45 +01:00
|
|
|
endif
|
2016-12-21 03:16:30 +01:00
|
|
|
|
2017-02-23 17:13:23 +01:00
|
|
|
# FIXME: subdir('services')
|
2016-03-07 12:13:24 +01:00
|
|
|
subdir('modules')
|