blob: 50781e7892b9db09a1b950dcb353c610f291f463 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 4b1a6d247c78125096a6ea5ab3cab8a1f000dc23 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 Bishop1a4b7ee2018-12-16 17:11:34 -08004Subject: [PATCH] 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 Bishop1a4b7ee2018-12-16 17:11:34 -080019index 1f0bed7..8295deb 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020--- a/gio/tests/Makefile.am
21+++ b/gio/tests/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080022@@ -550,10 +550,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 Bishop1a4b7ee2018-12-16 17:11:34 -080035@@ -578,7 +577,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" > $@ && \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080047@@ -599,7 +602,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 Bishop1a4b7ee2018-12-16 17:11:34 -080056index 0e60987..927d13a 100644
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050057--- a/tests/gobject/Makefile.am
58+++ b/tests/gobject/Makefile.am
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080059@@ -51,10 +51,13 @@ if ENABLE_TIMELOOP
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050060 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
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080075@@ -71,4 +74,3 @@ testmarshal.c: testmarshal.h testmarshal.list $(glib_genmarshal)
76 BUILT_SOURCES += testmarshal.h testmarshal.c
77 CLEANFILES += stamp-testmarshal.h testmarshal.h testmarshal.c
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050078 EXTRA_DIST += testcommon.h testmarshal.list
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050079-endif # !CROSS_COMPILING
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080080\ No newline at end of file