summaryrefslogtreecommitdiff
path: root/tests/gobject
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2017-05-02 17:04:58 +0100
committerMatthias Clasen <mclasen@redhat.com>2017-07-13 19:03:39 -0400
commit2e9fd74b2576d276e246655aef7c40e04e51ea9e (patch)
treea166bcfaad31eb56f6478f5e1da2e0ac86b66a56 /tests/gobject
parent6af4f1752a44384290f378594c9fb7f655e31682 (diff)
downloadglib-2e9fd74b2576d276e246655aef7c40e04e51ea9e.tar.gz
meson: add tests/gobject and tests/refcount
Diffstat (limited to 'tests/gobject')
-rw-r--r--tests/gobject/meson.build59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build
new file mode 100644
index 000000000..e10a34590
--- /dev/null
+++ b/tests/gobject/meson.build
@@ -0,0 +1,59 @@
+gobject_tests = [
+ ['gvalue-test'],
+ ['paramspec-test'],
+ ['deftype'],
+ ['defaultiface', ['defaultiface.c', 'testmodule.c']],
+ ['dynamictype', ['dynamictype.c', 'testmodule.c']],
+ ['override'],
+ ['signals'],
+ ['singleton'],
+ ['references'],
+]
+
+# The marshal test requires running a binary, which means we cannot
+# build it when cross-compiling
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ gnome = import('gnome')
+
+ testmarshal_srcs = gnome.genmarshal('testmarshal',
+ sources : 'testmarshal.list',
+ prefix : 'test_marshal')
+
+ gobject_tests += [
+ ['accumulator', ['accumulator.c', testmarshal_srcs]],
+ ]
+endif
+
+foreach t : gobject_tests
+ test_name = t.get(0)
+ test_src = t.get(1, test_name + '.c')
+ test_extra_cargs = t.get(2, [])
+ test_timeout = t.get(3, 30)
+
+ # FIXME? $(GLIB_DEBUG_FLAGS)
+ exe = executable(test_name, test_src,
+ c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
+ dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
+ install : false,
+ )
+ # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
+ test(test_name, exe, env : test_env, timeout : test_timeout)
+endforeach
+
+# Don't install these ones, and keep them out of 'make check' because they take too long...
+executable('performance', 'performance.c',
+ c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
+ dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
+ install : false)
+
+executable('performance-threaded', 'performance-threaded.c',
+ c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
+ dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
+ install : false)
+
+if host_system != 'windows' and host_system != 'minix'
+ executable('timeloop-closure', 'timeloop-closure.c',
+ c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
+ dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
+ install : false)
+endif