summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-07-17 13:59:20 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-07-17 13:59:20 +0100
commita45bf85ce5c9bc7dd26551430cd2e2d80e079d1c (patch)
tree01beec367dd658dd2c95be5b832108a761db0ca5 /tests
parent4f17d1049f49d8d9e880b4e8a34cc62e0da9092e (diff)
tests: Do not use gnome.genmarshal()
We are providing glib-genmarshal; using the gnome module in Meson does not call the just built glib-genmarshal tool.
Diffstat (limited to 'tests')
-rw-r--r--tests/gobject/meson.build44
1 files changed, 31 insertions, 13 deletions
diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build
index f40601143..ba72d7a1e 100644
--- a/tests/gobject/meson.build
+++ b/tests/gobject/meson.build
@@ -10,19 +10,37 @@ gobject_tests = [
['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
+# We cannot use gnome.genmarshal() here
+testmarshal_h = custom_target('testmarshal_h',
+ output : 'testmarshal.h',
+ input : 'testmarshal.list',
+ command : [
+ python, glib_genmarshal,
+ '--prefix=test_marshal',
+ '--output=@OUTPUT@',
+ '--quiet',
+ '--header',
+ '@INPUT@',
+ ],
+)
+
+testmarshal_c = custom_target('testmarshal_c',
+ output : 'testmarshal.c',
+ input : 'testmarshal.list',
+ command : [
+ python, glib_genmarshal,
+ '--prefix=test_marshal',
+ '--include-header=testmarshal.h',
+ '--output=@OUTPUT@',
+ '--quiet',
+ '--body',
+ '@INPUT@',
+ ],
+)
+
+gobject_tests += [
+ ['accumulator', ['accumulator.c', testmarshal_c, testmarshal_h]],
+]
foreach t : gobject_tests
test_name = t.get(0)