Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From 4b1a6d247c78125096a6ea5ab3cab8a1f000dc23 Mon Sep 17 00:00:00 2001 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> |
| 3 | Date: Mon, 9 Nov 2015 11:07:27 +0200 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH] Enable more tests while cross-compiling |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | |
| 6 | Upstream disables a few tests while cross-compiling because their build requires |
| 7 | running other built binaries. This usually makes sense but in the cross-compile |
| 8 | case we can depend on glib-2.0-native. |
| 9 | |
| 10 | Upstream-Status: Inappropriate [OE specific] |
| 11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 13 | --- |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 14 | gio/tests/Makefile.am | 10 ++++++---- |
| 15 | tests/gobject/Makefile.am | 8 +++++--- |
| 16 | 2 files changed, 11 insertions(+), 7 deletions(-) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 17 | |
| 18 | diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 19 | index 1f0bed7..8295deb 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | --- a/gio/tests/Makefile.am |
| 21 | +++ b/gio/tests/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 22 | @@ -550,10 +550,9 @@ test_programs += \ |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | 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 Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 35 | @@ -578,7 +577,11 @@ if !ENABLE_INSTALLED_TESTS |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 36 | 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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 45 | test-generated.txt: test1.txt |
| 46 | $(AM_V_GEN) echo "Generated" > $@ && \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 47 | @@ -599,7 +602,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) -- |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 48 | |
| 49 | EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 50 | CLEANFILES += test-generated.txt test_resources.c test_resources2.[ch] plugin_resources.c test.gresource |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 51 | -endif # !CROSS_COMPILING |
| 52 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 53 | BUILT_SOURCES += giotypefuncs.inc |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 54 | |
| 55 | diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 56 | index 0e60987..927d13a 100644 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 57 | --- a/tests/gobject/Makefile.am |
| 58 | +++ b/tests/gobject/Makefile.am |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 59 | @@ -51,10 +51,13 @@ if ENABLE_TIMELOOP |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 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 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 75 | @@ -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 Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 78 | EXTRA_DIST += testcommon.h testmarshal.list |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 79 | -endif # !CROSS_COMPILING |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 80 | \ No newline at end of file |