1 common_gio_tests_deps = [
9 '-DG_LOG_DOMAIN="GLib-GIO"',
10 '-DGLIB_MKENUMS="@0@"'.format(glib_mkenums),
11 '-DGLIB_COMPILE_SCHEMAS="@0@"'.format(glib_compile_schemas.full_path()),
15 # workaround for https://github.com/mesonbuild/meson/issues/6880
16 if build_machine.system() == 'linux'
17 libutil_name = 'libutil'
18 libutil = run_command('sh', '-c',
19 '''ldconfig -p | grep -o "[[:space:]]@0@\.so\(\.[0-9]\+\)\?\b"'''
20 .format(libutil_name), check: false).stdout().strip().split('\n')
22 if libutil.length() > 0
23 message('Found libutil as @0@'.format(libutil[0]))
24 test_c_args += '-DLIBUTIL_SONAME="@0@"'.format(libutil[0])
26 warning('libutil not found')
27 endif # libutil.length() > 0
28 endif # build_machine.system() == 'linux'
30 if host_machine.system() == 'windows'
31 common_gio_tests_deps += [iphlpapi_dep, winsock2, cc.find_library ('secur32')]
34 subdir('gdbus-object-manager-example')
36 gengiotypefuncs_prog = find_program('gengiotypefuncs.py')
37 giotypefuncs_inc = custom_target(
39 output : 'giotypefuncs.inc',
40 input : gio_headers + [gioenumtypes_h] + gobject_install_headers,
41 command: [gengiotypefuncs_prog, '@OUTPUT@', '@INPUT@'])
43 # Test programs buildable on all platforms
46 'async-close-output-stream' : {},
47 'async-splice-output-stream' : {},
48 'buffered-input-stream' : {},
49 'buffered-output-stream' : {},
53 'converter-stream' : {},
55 'data-input-stream' : {},
56 'data-output-stream' : {},
57 'defaultvalue' : {'extra_sources' : [giotypefuncs_inc]},
58 'fileattributematcher' : {},
59 'filter-streams' : {},
65 'gdbus-addresses' : {},
69 'memory-input-stream' : {},
70 'memory-monitor' : {},
71 'memory-output-stream' : {},
72 'mount-operation' : {},
73 'network-address' : {'extra_sources': ['mock-resolver.c']},
74 'network-monitor' : {},
75 'network-monitor-race' : {},
77 'pollable' : {'dependencies' : [libdl_dep]},
78 'power-profile-monitor' : {},
81 'simple-async-result' : {},
85 'socket-listener' : {},
86 'socket-service' : {},
92 'testfilemonitor' : {'suite' : ['slow', 'flaky']},
93 'thumbnail-verification' : {},
94 'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']},
95 'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
96 'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
97 'tls-bindings' : {'extra_sources' : ['gtesttlsbackend.c']},
98 'gdbus-address-get-session' : {},
102 test_extra_programs = {
103 'gdbus-connection-flush-helper' : {},
104 'gdbus-testserver' : {},
105 'gsubprocess-testprog' : {},
112 test_env = environment()
113 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
114 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
115 test_env.set('GIO_MODULE_DIR', '')
117 # Check for libdbus1 - Optional - is only used in the GDBus test cases
118 # 1.2.14 required for dbus_message_set_serial
119 dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14')
120 if not dbus1_dep.found()
121 if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
122 # MSVC: Search for the DBus library by the configuration, which corresponds
123 # to the output of CMake builds of DBus. Note that debugoptimized
124 # is really a Release build with .PDB files.
126 dbus1_dep = cc.find_library('dbus-1d', required : false)
128 dbus1_dep = cc.find_library('dbus-1', required : false)
133 glib_conf.set('HAVE_DBUS1', 1)
136 'gdbus-serialization' : {
137 'extra_sources' : ['gdbus-tests.c'],
138 'dependencies' : [dbus1_dep],
140 'gdbus-server-auth' : {
141 'dependencies' : [dbus1_dep],
145 # We can build a cut-down version of this test without libdbus
147 'gdbus-server-auth' : {},
151 # Test programs buildable on UNIX only
152 if host_machine.system() != 'windows'
156 'dependencies' : [libgdbus_example_objectmanager_dep],
157 'install_rpath' : installed_tests_execdir
159 'gdbus-peer-object-manager' : {},
161 'socket-address' : {},
162 'stream-rw_all' : {},
166 'g-file-info-filesystem-readonly' : {},
167 'gschema-compile' : {'install' : false},
171 # LD_PRELOAD modules don't work so well with AddressSanitizer
172 if have_rtld_next and get_option('b_sanitize') == 'none'
174 'gsocketclient-slow' : {
176 shared_library('slow-connect-preload',
177 'slow-connect-preload.c',
179 dependencies: libdl_dep,
180 install_dir : installed_tests_execdir,
181 install: installed_tests_enabled,
185 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir())
187 'installed_tests_env' : {
188 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(installed_tests_execdir),
194 # Uninstalled because of the check-for-executable logic in DesktopAppInfo
195 # unable to find the installed executable
196 if not glib_have_cocoa
201 'desktop-app-info' : {
207 test_extra_programs += {
208 'basic-application' : {},
213 if not glib_have_cocoa
214 test_extra_programs += {
222 # Test programs that need to bring up a session bus (requires dbus-daemon)
223 have_dbus_daemon = find_program('dbus-daemon', required : false).found()
226 '--annotate', 'org.project.Bar', 'Key1', 'Value1',
227 '--annotate', 'org.project.Bar', 'org.gtk.GDBus.Internal', 'Value2',
228 '--annotate', 'org.project.Bar.HelloWorld()', 'Key3', 'Value3',
229 '--annotate', 'org.project.Bar::TestSignal', 'Key4', 'Value4',
230 '--annotate', 'org.project.Bar:ay', 'Key5', 'Value5',
231 '--annotate', 'org.project.Bar.TestPrimitiveTypes()[val_int32]', 'Key6', 'Value6',
232 '--annotate', 'org.project.Bar.TestPrimitiveTypes()[ret_uint32]', 'Key7', 'Value7',
233 '--annotate', 'org.project.Bar::TestSignal[array_of_strings]', 'Key8', 'Value8',
235 # Generate gdbus-test-codegen-generated.{c,h}
236 gdbus_test_codegen_generated = custom_target('gdbus-test-codegen-generated',
237 input : ['test-codegen.xml'],
238 output : ['gdbus-test-codegen-generated.h',
239 'gdbus-test-codegen-generated.c'],
240 depend_files : gdbus_codegen_built_files,
241 command : [python, gdbus_codegen,
242 '--interface-prefix', 'org.project.',
243 '--output-directory', '@OUTDIR@',
244 '--generate-c-code', 'gdbus-test-codegen-generated',
245 '--c-generate-object-manager',
246 '--c-generate-autocleanup', 'all',
247 '--c-namespace', 'Foo_iGen',
248 '--generate-docbook', 'gdbus-test-codegen-generated-doc',
251 # Generate gdbus-test-codegen-generated-min-required-2-64.{c,h}
252 gdbus_test_codegen_generated_min_required_2_64 = custom_target('gdbus-test-codegen-generated-min-required-2-64',
253 input : ['test-codegen.xml'],
254 output : ['gdbus-test-codegen-generated-min-required-2-64.h',
255 'gdbus-test-codegen-generated-min-required-2-64.c'],
256 depend_files : gdbus_codegen_built_files,
257 command : [python, gdbus_codegen,
258 '--glib-min-required', '2.64',
259 '--interface-prefix', 'org.project.',
260 '--output-directory', '@OUTDIR@',
261 '--generate-c-code', 'gdbus-test-codegen-generated-min-required-2-64',
262 '--c-generate-object-manager',
263 '--c-generate-autocleanup', 'all',
264 '--c-namespace', 'Foo_iGen',
265 '--generate-docbook', 'gdbus-test-codegen-generated-doc',
268 gdbus_test_codegen_generated_interface_info = [
269 custom_target('gdbus-test-codegen-generated-interface-info-h',
270 input : ['test-codegen.xml'],
271 output : ['gdbus-test-codegen-generated-interface-info.h'],
272 depend_files : gdbus_codegen_built_files,
273 command : [python, gdbus_codegen,
274 '--interface-info-header',
276 '--output', '@OUTPUT@',
278 custom_target('gdbus-test-codegen-generated-interface-info-c',
279 input : ['test-codegen.xml'],
280 output : ['gdbus-test-codegen-generated-interface-info.c'],
281 depend_files : gdbus_codegen_built_files,
282 command : [python, gdbus_codegen,
283 '--interface-info-body',
285 '--output', '@OUTPUT@',
289 extra_sources = ['gdbus-sessionbus.c', 'gdbus-tests.c']
293 'extra_sources' : extra_sources,
296 'gdbus-auth' : {'extra_sources' : extra_sources},
297 'gdbus-bz627724' : {'extra_sources' : extra_sources},
298 'gdbus-close-pending' : {'extra_sources' : extra_sources},
299 'gdbus-connection' : {'extra_sources' : extra_sources},
300 'gdbus-connection-loss' : {'extra_sources' : extra_sources},
301 'gdbus-connection-slow' : {'extra_sources' : extra_sources},
302 'gdbus-error' : {'extra_sources' : extra_sources},
303 'gdbus-exit-on-close' : {'extra_sources' : extra_sources},
305 'extra_sources' : extra_sources,
308 'gdbus-introspection' : {'extra_sources' : extra_sources},
309 'gdbus-names' : {'extra_sources' : extra_sources},
310 'gdbus-proxy' : {'extra_sources' : extra_sources},
311 'gdbus-proxy-threads' : {
312 'extra_sources' : extra_sources,
313 'dependencies' : [dbus1_dep],
315 'gdbus-proxy-unique-name' : {'extra_sources' : extra_sources},
316 'gdbus-proxy-well-known-name' : {'extra_sources' : extra_sources},
317 'gdbus-test-codegen' : {
318 'extra_sources' : [extra_sources, gdbus_test_codegen_generated, gdbus_test_codegen_generated_interface_info],
319 'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'],
321 'gdbus-threading' : {
322 'extra_sources' : extra_sources,
326 'extra_sources' : extra_sources,
330 'extra_sources' : [extra_sources, 'gnotification-server.c'],
332 'gdbus-test-codegen-old' : {
333 'source' : 'gdbus-test-codegen.c',
334 'extra_sources' : [extra_sources, gdbus_test_codegen_generated, gdbus_test_codegen_generated_interface_info],
335 'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36',
336 '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36'],
338 'gdbus-test-codegen-min-required-2-64' : {
339 'source' : 'gdbus-test-codegen.c',
340 'extra_sources' : [extra_sources, gdbus_test_codegen_generated_min_required_2_64, gdbus_test_codegen_generated_interface_info],
341 'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_64'],
343 'gapplication' : {'extra_sources' : extra_sources},
346 if not glib_have_cocoa
349 'extra_sources' : extra_sources,
354 fake_document_portal_generated = custom_target('fake-document-portal-generated',
355 input : ['../org.freedesktop.portal.Documents.xml'],
356 output : ['fake-document-portal-generated.h',
357 'fake-document-portal-generated.c'],
358 depend_files : gdbus_codegen_built_files,
359 command : [python, gdbus_codegen,
360 '--interface-prefix', 'org.freedesktop.portal.',
361 '--output-directory', '@OUTDIR@',
362 '--generate-c-code', 'fake-document-portal-generated',
363 '--c-namespace', 'Fake',
366 test_extra_programs += {
367 'fake-document-portal' : {
368 'extra_sources': fake_document_portal_generated,
370 'fake-service-name' : {}
372 endif # have_dbus_daemon
374 # This test is currently unreliable
375 executable('gdbus-overflow', 'gdbus-overflow.c',
376 c_args : test_c_args,
377 dependencies : common_gio_tests_deps,
378 install_dir : installed_tests_execdir,
379 install : installed_tests_enabled)
382 'gdbus-connection-flush' : {
383 'extra_sources' : ['test-io-stream.c', 'test-pipe-unix.c'],
385 'gdbus-non-socket' : {
386 'extra_sources' : ['gdbus-tests.c', 'test-io-stream.c', 'test-pipe-unix.c'],
390 # Generate test.mo from de.po using msgfmt
391 msgfmt = find_program('msgfmt', required : false)
393 subdir('de/LC_MESSAGES')
396 'extra_sources' : [test_mo],
397 'c_args' : ['-DSRCDIR="@0@"'.format(meson.current_source_dir()),
398 '-DTEST_LOCALE_PATH="@0@"'.format(test_mo_dir)],
405 # Test programs buildable on Windows only
406 if host_machine.system() == 'windows'
407 gio_tests += {'win32-streams' : {}}
410 if cc.get_id() != 'msvc'
413 'source' : 'autoptr.c',
418 test_extra_programs += {
419 'gio-du' : {'install' : false},
420 'echo-server' : {'install' : false},
421 'filter-cat' : {'install' : false},
422 'gapplication-example-actions' : {'install' : false},
423 'gapplication-example-cmdline' : {'install' : false},
424 'gapplication-example-cmdline2' : {'install' : false},
425 'gapplication-example-cmdline3' : {'install' : false},
426 'gapplication-example-cmdline4' : {'install' : false},
427 'gapplication-example-dbushooks' : {'install' : false},
428 'gapplication-example-open' : {'install' : false},
430 'extra_sources' : gdbus_daemon_sources,
433 'gdbus-example-export' : {'install' : false},
434 'gdbus-example-own-name' : {'install' : false},
435 'gdbus-example-peer' : {'install' : false},
436 'gdbus-example-proxy-subclass' : {'install' : false},
437 'gdbus-example-server' : {'install' : false},
438 'gdbus-example-subtree' : {'install' : false},
439 'gdbus-example-watch-name' : {'install' : false},
440 'gdbus-example-watch-proxy' : {'install' : false},
441 'httpd' : {'install' : false},
442 'proxy' : {'install' : false},
443 'resolver' : {'install' : false},
444 'send-data' : {'install' : false},
445 'socket-server' : {'install' : false},
447 'extra_sources' : ['gtlsconsoleinteraction.c'],
452 gdbus_example_objectmanager_sources = files(
453 'gdbus-example-objectmanager-client.c',
454 'gdbus-example-objectmanager-server.c',
457 if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
458 test_extra_programs += {
459 # These three are manual-run tests because they need a session bus but don't bring one up themselves
460 # FIXME: these build but don't seem to work!
461 'gdbus-example-objectmanager-client' : {
462 'dependencies' : [libgdbus_example_objectmanager_dep],
465 'gdbus-example-objectmanager-server' : {
466 'dependencies' : [libgdbus_example_objectmanager_dep],
469 'gdbus-test-fixture' : {
470 'dependencies' : [libgdbus_example_objectmanager_dep],
476 if host_machine.system() != 'windows'
477 test_extra_programs += {
478 'gdbus-example-unix-fd-client' : {
484 appinfo_test_desktop_files = [
485 'appinfo-test-gnome.desktop',
486 'appinfo-test-notgnome.desktop',
487 'appinfo-test.desktop',
488 'appinfo-test2.desktop',
491 cdata = configuration_data()
492 if installed_tests_enabled
493 cdata.set('installed_tests_dir', installed_tests_execdir)
495 cdata.set('installed_tests_dir', meson.current_build_dir())
498 foreach appinfo_test_desktop_file : appinfo_test_desktop_files
499 if installed_tests_enabled
501 input: appinfo_test_desktop_file + '.in',
502 output: appinfo_test_desktop_file,
503 install_dir: installed_tests_execdir,
504 configuration: cdata,
508 input: appinfo_test_desktop_file + '.in',
509 output: appinfo_test_desktop_file,
510 configuration: cdata,
515 if installed_tests_enabled
519 'appinfo-test-actions.desktop',
520 'appinfo-test-static.desktop',
522 'org.gtk.test.dbusappinfo.desktop',
523 'org.gtk.test.dbusappinfo.flatpak.desktop',
525 install_dir : installed_tests_execdir,
527 install_subdir('x-content', install_dir : installed_tests_execdir)
528 install_subdir('desktop-files', install_dir : installed_tests_execdir)
529 install_subdir('thumbnails', install_dir : installed_tests_execdir)
530 install_subdir('cert-tests', install_dir : installed_tests_execdir)
532 cdata = configuration_data()
533 cdata.set('installed_tests_dir', installed_tests_execdir)
534 cdata.set('program', 'static-link.py ' + glib_pkgconfigreldir)
536 input: installed_tests_template,
537 output: 'static-link.test',
538 install_dir: installed_tests_metadir,
541 install_subdir('static-link', install_dir : installed_tests_execdir)
542 install_data('static-link.py', install_dir : installed_tests_execdir)
545 'memory-monitor-dbus',
546 'memory-monitor-portal',
547 'power-profile-monitor-dbus',
548 'power-profile-monitor-portal'
551 foreach monitor_test : monitor_tests
552 cdata = configuration_data()
553 cdata.set('installed_tests_dir', installed_tests_execdir)
554 cdata.set('program', monitor_test + '.py')
557 input: installed_tests_template_tap,
558 output: monitor_test + '.test',
559 install_dir: installed_tests_metadir,
562 cdata = configuration_data()
563 cdata.set('libexecdir', join_paths(glib_prefix, get_option('libexecdir')))
565 input: monitor_test + '.py.in',
566 output: monitor_test + '.py',
567 install_dir : installed_tests_execdir,
568 configuration: cdata,
573 if not meson.is_cross_build() or meson.has_exe_wrapper()
575 plugin_resources_c = custom_target('plugin-resources.c',
576 input : 'test4.gresource.xml',
577 output : 'plugin-resources.c',
578 command : [glib_compile_resources,
580 '--sourcedir=' + meson.current_source_dir(),
582 '--c-name', '_g_plugin',
585 shared_module('resourceplugin', 'resourceplugin.c', plugin_resources_c,
586 link_args : export_dynamic_ldflags,
587 dependencies : common_gio_tests_deps,
588 install_dir : installed_tests_execdir,
589 install : installed_tests_enabled
592 # referenced by test2.gresource.xml
593 big_test_resource = custom_target(
594 'gresource-big-test.txt',
595 input : ['gen-big-test-resource.py'],
596 output : ['gresource-big-test.txt'],
597 command : [python, '@INPUT0@', '@OUTPUT@'])
599 test_gresource = custom_target('test.gresource',
600 input : 'test.gresource.xml',
601 output : 'test.gresource',
602 command : [glib_compile_resources,
604 '--sourcedir=' + meson.current_source_dir(),
605 '--sourcedir=' + meson.current_build_dir(),
607 install_dir : installed_tests_execdir,
608 install : installed_tests_enabled)
610 test_resources2_c = custom_target('test_resources2.c',
611 input : 'test3.gresource.xml',
612 output : 'test_resources2.c',
613 command : [glib_compile_resources,
615 '--sourcedir=' + meson.current_source_dir(),
617 '--c-name', '_g_test2',
621 test_resources2_h = custom_target('test_resources2.h',
622 input : 'test3.gresource.xml',
623 output : 'test_resources2.h',
624 command : [glib_compile_resources,
626 '--sourcedir=' + meson.current_source_dir(),
628 '--c-name', '_g_test2',
632 test_resources_c = custom_target('test_resources.c',
633 input : 'test2.gresource.xml',
634 depends : big_test_resource,
635 output : 'test_resources.c',
636 command : [glib_compile_resources,
638 '--sourcedir=' + meson.current_source_dir(),
639 '--sourcedir=' + meson.current_build_dir(),
641 '--c-name', '_g_test1',
644 digit_test_resources_c = custom_target('digit_test_resources.c',
645 input : '111_digit_test.gresource.xml',
646 output : 'digit_test_resources.c',
647 command : [glib_compile_resources,
649 '--sourcedir=' + meson.current_source_dir(),
650 '--sourcedir=' + meson.current_build_dir(),
655 digit_test_resources_h = custom_target('digit_test_resources.h',
656 input : '111_digit_test.gresource.xml',
657 output : 'digit_test_resources.h',
658 command : [glib_compile_resources,
660 '--sourcedir=' + meson.current_source_dir(),
665 # referenced by test.gresource.xml
666 test_generated_txt = configure_file(input : 'test1.txt',
667 output : 'test-generated.txt',
671 resources_extra_sources = [
676 digit_test_resources_c,
677 digit_test_resources_h,
680 # Create object file containing resource data for testing the --external-data
681 # option. Currently only GNU ld and objcopy, or (as of 2019) LLVM ld and
682 # objcopy, support the right options.
683 objcopy_supports_add_symbol = false
684 objcopy = find_program('objcopy', required : false)
686 # FIXME: This should be `check: true` because we never really expect
687 # `objcopy --help` to fail, given that `objcopy` exists. However, it does
688 # fail on FreeBSD because ELF Tool Chain has
689 # [a bug](https://sourceforge.net/p/elftoolchain/code/3950/).
690 # This can be changed back to `check: true` once our CI uses a FreeBSD
691 # version which includes the fix.
692 # See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2360#note_1318608
693 objcopy_supports_add_symbol = run_command(objcopy, '--help', check: false).stdout().contains('--add-symbol')
696 ld = find_program('ld', required : false)
698 if build_machine.system() == 'linux' and objcopy.found() and objcopy_supports_add_symbol and ld.found()
699 test_gresource_binary = custom_target('test5.gresource',
700 input : 'test5.gresource.xml',
701 output : 'test5.gresource',
702 command : [glib_compile_resources,
704 '--sourcedir=' + meson.current_source_dir(),
705 '--sourcedir=' + meson.current_build_dir(),
707 install_dir : installed_tests_execdir,
708 install : installed_tests_enabled)
710 # Create resource data file
711 test_resources_binary_c = custom_target('test_resources_binary.c',
712 input : 'test5.gresource.xml',
713 output : 'test_resources_binary.c',
714 command : [glib_compile_resources,
716 '--sourcedir=' + meson.current_source_dir(),
717 '--sourcedir=' + meson.current_build_dir(),
720 '--c-name', '_g_binary_test1',
723 # Create object file containing resource data
724 test_resources_binary = custom_target('test_resources.o',
725 input : test_gresource_binary,
726 output : 'test_resources.o',
733 # Rename symbol to match the one in the C file
734 test_resources_binary2 = custom_target('test_resources2.o',
735 input : test_resources_binary,
736 output : 'test_resources2.o',
738 '--add-symbol','_g_binary_test1_resource_data=.data:0',
742 resources_extra_sources += [
743 test_resources_binary_c,
744 test_resources_binary2,
750 'extra_sources' : resources_extra_sources,
755 foreach test_name, extra_args : gio_tests
756 source = extra_args.get('source', test_name + '.c')
757 extra_sources = extra_args.get('extra_sources', [])
758 install = installed_tests_enabled and extra_args.get('install', true)
759 installed_tests_env = extra_args.get('installed_tests_env', {})
762 test_conf = configuration_data()
763 test_conf.set('installed_tests_dir', installed_tests_execdir)
764 test_conf.set('program', test_name)
765 test_env_override = ''
766 if installed_tests_env != {}
768 foreach var, value : installed_tests_env
769 envs += '@0@=@1@'.format(var, value)
771 test_env_override = '@0@ @1@ '.format(env_program.path(), ' '.join(envs))
773 test_conf.set('env', test_env_override)
775 input: installed_tests_template_tap,
776 output: test_name + '.test',
777 install_dir: installed_tests_metadir,
778 configuration: test_conf
782 exe = executable(test_name, [source, extra_sources],
783 c_args : test_c_args + extra_args.get('c_args', []),
784 dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
785 install_rpath : extra_args.get('install_rpath', ''),
786 install_dir: installed_tests_execdir,
790 suite = ['gio'] + extra_args.get('suite', [])
791 timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
792 local_test_env = test_env
794 foreach var, value : extra_args.get('env', {})
795 local_test_env.append(var, value)
799 env : local_test_env,
802 is_parallel : extra_args.get('is_parallel', true),
803 depends : extra_args.get('depends', []),
807 foreach program_name, extra_args : test_extra_programs
808 source = extra_args.get('source', program_name + '.c')
809 extra_sources = extra_args.get('extra_sources', [])
810 install = installed_tests_enabled and extra_args.get('install', true)
811 executable(program_name, [source, extra_sources],
812 c_args : test_c_args,
813 dependencies : common_gio_tests_deps + extra_args.get('dependencies', []),
814 install_dir : installed_tests_execdir,
819 foreach test_name : python_tests
823 args: ['-B', files(test_name)],
825 suite: ['gio', 'no-valgrind'],
828 if installed_tests_enabled
831 install_dir: installed_tests_execdir,
832 install_mode: 'rwxr-xr-x',
835 test_conf = configuration_data()
836 test_conf.set('installed_tests_dir', installed_tests_execdir)
837 test_conf.set('program', test_name)
838 test_conf.set('env', '')
840 input: installed_tests_template_tap,
841 output: test_name + '.test',
842 install_dir: installed_tests_metadir,
843 configuration: test_conf,
848 # TAP test runner for Python tests
849 if installed_tests_enabled
851 files('taptestrunner.py'),
852 install_dir: installed_tests_execdir,