diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-01-26 21:27:36 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-01-28 00:07:08 +0000 |
commit | d58a8a153cf21dcbe98b0cdc138efafb75459d28 (patch) | |
tree | 461ae45ad8a56f27c526769dae836ebfcd5c46ff /meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch | |
parent | d6f97cf271080779675094d83f17e9974f9c0927 (diff) | |
download | poky-d58a8a153cf21dcbe98b0cdc138efafb75459d28.tar.gz |
gdk-pixbuf: do not use tools from gdk-pixbuf-native when building tests
The patch that allows to do so has not been accepted upstream, and wasn't correctly
working as it was running a native executable (gdk-pixbuf-query-loaders) with target .so plugins.
On the other hand, out of 20+ (currently 23) tests only three require
running binaries at build time to produce special test-specific input data:
cve-2015-4491
pixbuf-pixdata
pixbuf-resource
So let's simply omit these from the build: this can be done with a far
less invasive patch which has a chance of being accepted upstream.
gdk-pixbuf-print-mime-types is no longer installed
(the replaced patch was doing that).
(From OE-Core rev: 0d926508e75095eb446699b612729d0243eacc91)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch')
-rw-r--r-- | meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch new file mode 100644 index 0000000000..7250fa3f62 --- /dev/null +++ b/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-meson.build-allow-a-subset-of-tests-in-cross-compile.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 9d3b374e75692da3d1d05344a1693c85a3098f47 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Thu, 26 Jan 2023 20:29:46 +0100 | ||
4 | Subject: [PATCH] meson.build: allow (a subset of) tests in cross compile | ||
5 | settings | ||
6 | |||
7 | There is no need to completely disable tests: most of them | ||
8 | do not require running target executables at build time, | ||
9 | and so can be built and installed. | ||
10 | |||
11 | This requires inserting a couple of specific guards around | ||
12 | items that do require running target executables. | ||
13 | |||
14 | Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/150] | ||
15 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
16 | --- | ||
17 | meson.build | 6 +++--- | ||
18 | tests/meson.build | 10 ++++++---- | ||
19 | 2 files changed, 9 insertions(+), 7 deletions(-) | ||
20 | |||
21 | diff --git a/meson.build b/meson.build | ||
22 | index 8a16c8f..7c8b20f 100644 | ||
23 | --- a/meson.build | ||
24 | +++ b/meson.build | ||
25 | @@ -369,10 +369,10 @@ subdir('gdk-pixbuf') | ||
26 | # i18n | ||
27 | subdir('po') | ||
28 | |||
29 | +if get_option('tests') | ||
30 | + subdir('tests') | ||
31 | +endif | ||
32 | if not meson.is_cross_build() | ||
33 | - if get_option('tests') | ||
34 | - subdir('tests') | ||
35 | - endif | ||
36 | subdir('thumbnailer') | ||
37 | endif | ||
38 | |||
39 | diff --git a/tests/meson.build b/tests/meson.build | ||
40 | index 28c2525..c45e765 100644 | ||
41 | --- a/tests/meson.build | ||
42 | +++ b/tests/meson.build | ||
43 | @@ -4,7 +4,7 @@ | ||
44 | # gdk-pixbuf-pixdata from build directory because it needs all DLL locations in | ||
45 | # $PATH. Ideally we should use gnome.compile_resources() and let Meson deal with | ||
46 | # this problem: See https://github.com/mesonbuild/meson/issues/8266. | ||
47 | -if enabled_loaders.contains('png') and host_system != 'windows' | ||
48 | +if enabled_loaders.contains('png') and host_system != 'windows' and not meson.is_cross_build() | ||
49 | # Resources; we cannot use gnome.compile_resources() here, because we need to | ||
50 | # override the environment in order to use the utilities we just built instead | ||
51 | # of the system ones | ||
52 | @@ -166,9 +166,11 @@ endif | ||
53 | test_deps = gdk_pixbuf_deps + [ gdkpixbuf_dep, ] | ||
54 | test_args = [ '-k' ] | ||
55 | test_env = environment() | ||
56 | -test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) | ||
57 | -test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) | ||
58 | -test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path()) | ||
59 | +if not meson.is_cross_build() | ||
60 | + test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) | ||
61 | + test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) | ||
62 | + test_env.set('GDK_PIXBUF_MODULE_FILE', loaders_cache.full_path()) | ||
63 | +endif | ||
64 | |||
65 | foreach test_name, test_data: installed_tests | ||
66 | test_sources = [ test_name + '.c', 'test-common.c' ] | ||