blob: b98f933dae3d2a3e90161ea64c3aa15c170f48e1 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From d762907d33b81cf7469b5696c87f2188d2050afb Mon Sep 17 00:00:00 2001
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05002From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 9 Nov 2015 11:07:27 +0200
Brad Bishop316dfdd2018-06-25 12:45:53 -04004Subject: [PATCH 06/10] Enable more tests while cross-compiling
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05005
6Upstream disables a few tests while cross-compiling because their build requires
7running other built binaries. This usually makes sense but in the cross-compile
8case we can depend on glib-2.0-native.
9
10Upstream-Status: Inappropriate [OE specific]
11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040012
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050013---
Brad Bishop316dfdd2018-06-25 12:45:53 -040014 gio/tests/Makefile.am | 10 ++++++----
15 tests/gobject/Makefile.am | 8 +++++---
16 2 files changed, 11 insertions(+), 7 deletions(-)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050017
18diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
Brad Bishop316dfdd2018-06-25 12:45:53 -040019index acc1da4..9176640 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020--- a/gio/tests/Makefile.am
21+++ b/gio/tests/Makefile.am
Brad Bishop316dfdd2018-06-25 12:45:53 -040022@@ -516,10 +516,9 @@ test_programs += \
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050023 endif
24
25 # -----------------------------------------------------------------------------
26-# The resources test is a bit more complicated, and we cannot build it when
27-# cross-compiling GIO because it requires running a binary...
28+# The resources test is a bit more complicated, and requires glib-native
29+# for running a binary
30
31-if !CROSS_COMPILING
32 test_programs += resources
33 resources_SOURCES = resources.c
34 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
Brad Bishop316dfdd2018-06-25 12:45:53 -040035@@ -543,7 +542,11 @@ if !ENABLE_INSTALLED_TESTS
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050036 libresourceplugin_la_LDFLAGS += -rpath /
37 endif
38
39+if !CROSS_COMPILING
40 glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
41+else
42+glib_compile_resources=glib-compile-resources
43+endif
44
Brad Bishop316dfdd2018-06-25 12:45:53 -040045 test-generated.txt: test1.txt
46 $(AM_V_GEN) echo "Generated" > $@ && \
47@@ -564,7 +567,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050048
49 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
Patrick Williamsc0f7c042017-02-23 20:41:17 -060050 CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050051-endif # !CROSS_COMPILING
52
Brad Bishop316dfdd2018-06-25 12:45:53 -040053 BUILT_SOURCES += giotypefuncs.inc
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050054
55diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
Brad Bishop316dfdd2018-06-25 12:45:53 -040056index 656941d..68555ff 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050057--- a/tests/gobject/Makefile.am
58+++ b/tests/gobject/Makefile.am
59@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
60 installed_test_programs += timeloop-closure
61 endif
62
63-# The marshal test requires running a binary, which means we cannot
64-# build it when cross-compiling
65+# The marshal test requires running a binary, which means we require
66+# glib-native when cross-compiling
67 if !CROSS_COMPILING
68 glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
69+else
70+glib_genmarshal=$(shell which glib-genmarshal)
71+endif
72
73 testmarshal.h: stamp-testmarshal.h
74 @true
75@@ -69,7 +72,6 @@ BUILT_SOURCES += testmarshal.h testmarshal.c
76 CLEANFILES += stamp-testmarshal.h
77 EXTRA_DIST += testcommon.h testmarshal.list
78 BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
79-endif # !CROSS_COMPILING
80
81 dist-hook: $(BUILT_EXTRA_DIST)
82 files='$(BUILT_EXTRA_DIST)'; \
Brad Bishop316dfdd2018-06-25 12:45:53 -040083--
842.14.1
85