1 py3_mod = import('python3')
2 py3 = py3_mod.find_python()
23 # FIXME: put common bits of test environment() in one location
24 # Not entirely random of course, but at least it changes over time
25 random_number = minor_version + meson.version().split('.').get(1).to_int()
27 test_env = environment()
28 test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
29 test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
30 test_env.set('G_DEBUG', 'gc-friendly')
31 test_env.set('MALLOC_CHECK_', '2')
32 test_env.set('MALLOC_PERTURB_', '@0@'.format(random_number % 256))
34 foreach test_name : gobject_tests
35 deps = [libm, thread_dep, libglib_dep, libgobject_dep]
36 test_src = '@0@.c'.format(test_name)
37 # private is an existing or reserved target it seems
38 if test_name == 'private'
39 test_name = 'gobject-private'
41 exe = executable(test_name, test_src,
42 c_args : ['-DG_LOG_DOMAIN="GLib-GObject"'],
45 test(test_name, exe, env : test_env, suite : ['gobject'])
48 marshalers_h = custom_target('marshalers_h',
49 output : 'marshalers.h',
50 input : 'marshalers.list',
52 python, glib_genmarshal,
54 '--valist-marshallers',
61 marshalers_c = custom_target('marshalers_c',
62 output : 'marshalers.c',
63 input : 'marshalers.list',
65 python, glib_genmarshal,
67 '--valist-marshallers',
68 '--include-header=marshalers.h',
76 exe = executable('signals',
77 'signals.c', marshalers_h, marshalers_c,
78 c_args : ['-DG_LOG_DOMAIN="GLib-GObject"'],
81 test('signals', exe, env : test_env, suite : ['gobject'])
86 args: files('mkenums.py'),