summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2022-02-07 01:08:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-08 14:20:18 +0000
commit7db915b98d4597a91be8efbaece8a6d79a3513a1 (patch)
treea9b31d14093a27d487555e1297353f6d1a0d02de /meta/recipes-multimedia
parentbdaf6cdaaa1b709bd187003b9f2cba334853e298 (diff)
downloadpoky-7db915b98d4597a91be8efbaece8a6d79a3513a1.tar.gz
gstreamer1.0: upgrade 1.18.5 -> 1.20.0
- License update: The code actually is LGPLv2.1 but the COPYING file is wrong. https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/d157b23fb0ce175b167611a4cb019599d9017042 - Drop backported patches 0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch 0002-Remove-unused-valgrind-detection.patch 0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch - Update submitted patches 0001-tests-respect-the-idententaion-used-in-meson.patch 0002-tests-add-support-for-install-the-tests.patch 0003-tests-use-a-dictionaries-for-environment.patch 0004-tests-add-helper-script-to-run-the-installed_tests.patch (From OE-Core rev: 366b33dc94b056899ce8c5736be15c70d2e94626) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch)14
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch112
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch)67
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch32
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch)28
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch74
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch58
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.0.bb (renamed from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb)17
9 files changed, 136 insertions, 335 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
deleted file mode 100644
index 23ebd5c600..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 10 Oct 2020 19:09:03 +0000
4Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through
5 to system plugin scanner
6
7If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that.
8
9Falling through to the one installed on the system is problamatic in cross-compilation
10environemnts, regardless of whether one pointed to by the env var succeeded or failed.
11
12taken from:
13http://cgit.openembedded.org/openembedded-core/commit/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch?id=0db7ba34ca41b107042306d13a6f0162885c123b
14
15Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669>
16
17Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a]
18
19Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
20---
21 gst/gstpluginloader.c | 15 +++++++--------
22 1 file changed, 7 insertions(+), 8 deletions(-)
23
24diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c
25index d1e404d98..c626bf263 100644
26--- a/gst/gstpluginloader.c
27+++ b/gst/gstpluginloader.c
28@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
29 if (loader->child_running)
30 return TRUE;
31
32- /* Find the gst-plugin-scanner: first try the env-var if it is set,
33- * otherwise use the installed version */
34+ /* Find the gst-plugin-scanner */
35 env = g_getenv ("GST_PLUGIN_SCANNER_1_0");
36 if (env == NULL)
37 env = g_getenv ("GST_PLUGIN_SCANNER");
38
39 if (env != NULL && *env != '\0') {
40+ /* use the env-var if it is set */
41 GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env);
42 helper_bin = g_strdup (env);
43 res = gst_plugin_loader_try_helper (loader, helper_bin);
44 g_free (helper_bin);
45- }
46-
47- if (!res) {
48+ } else {
49+ /* use the installed version */
50 GST_LOG ("Trying installed plugin scanner");
51
52 #ifdef G_OS_WIN32
53@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader)
54 #endif
55 res = gst_plugin_loader_try_helper (loader, helper_bin);
56 g_free (helper_bin);
57+ }
58
59- if (!res) {
60- GST_INFO ("No gst-plugin-scanner available, or not working");
61- }
62+ if (!res) {
63+ GST_INFO ("No gst-plugin-scanner available, or not working");
64 }
65
66 return loader->child_running;
67--
682.29.2
69
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
index 6f571a12d8..312c04fbfd 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch
@@ -1,4 +1,4 @@
1From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d Mon Sep 17 00:00:00 2001 1From 1eb77a4ea5a3967c688d8f1192f99c605badc7e2 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com> 2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 11 Apr 2021 19:48:13 +0100 3Date: Sun, 11 Apr 2021 19:48:13 +0100
4Subject: [PATCH 1/4] tests: respect the idententaion used in meson 4Subject: [PATCH 1/4] tests: respect the idententaion used in meson
@@ -7,13 +7,13 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-
7 7
8Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> 8Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
9--- 9---
10 tests/check/meson.build | 10 +++++----- 10 subprojects/gstreamer/tests/check/meson.build | 10 +++++-----
11 1 file changed, 5 insertions(+), 5 deletions(-) 11 1 file changed, 5 insertions(+), 5 deletions(-)
12 12
13diff --git a/tests/check/meson.build b/tests/check/meson.build 13diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
14index a617cf159..b2636714b 100644 14index 9c4228b6e4..506606684d 100644
15--- a/tests/check/meson.build 15--- a/subprojects/gstreamer/tests/check/meson.build
16+++ b/tests/check/meson.build 16+++ b/subprojects/gstreamer/tests/check/meson.build
17@@ -146,11 +146,11 @@ foreach t : core_tests 17@@ -146,11 +146,11 @@ foreach t : core_tests
18 18
19 if not skip_test 19 if not skip_test
@@ -32,5 +32,5 @@ index a617cf159..b2636714b 100644
32 32
33 env = environment() 33 env = environment()
34-- 34--
352.31.1 352.33.1
36 36
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch
deleted file mode 100644
index 5121044734..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch
+++ /dev/null
@@ -1,112 +0,0 @@
1From e275ba2bd854ac15a4b65a8f07d9f042021950da Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com>
3Date: Fri, 14 Aug 2020 16:38:26 +0100
4Subject: [PATCH 2/3] Remove unused valgrind detection
5
6Having this just to log a debug message in case we're
7running inside valgrind doesn't seem very useful, and
8the code that used to use this no longer exists it seems.
9
10Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595>
11
12Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245]
13
14Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
15---
16 gst/gst_private.h | 2 --
17 gst/gstinfo.c | 39 ---------------------------------------
18 meson.build | 1 -
19 3 files changed, 42 deletions(-)
20
21diff --git a/gst/gst_private.h b/gst/gst_private.h
22index eefd044..8252ede 100644
23--- a/gst/gst_private.h
24+++ b/gst/gst_private.h
25@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin
26
27 G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin);
28
29-G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void);
30-
31 /* init functions called from gst_init(). */
32 G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void);
33 G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void);
34diff --git a/gst/gstinfo.c b/gst/gstinfo.c
35index eea1a21..d3035d6 100644
36--- a/gst/gstinfo.c
37+++ b/gst/gstinfo.c
38@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT;
39 static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT;
40 static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON;
41
42-/* FIXME: export this? */
43-gboolean
44-_priv_gst_in_valgrind (void)
45-{
46- static enum
47- {
48- GST_VG_UNCHECKED,
49- GST_VG_NO_VALGRIND,
50- GST_VG_INSIDE
51- }
52- in_valgrind = GST_VG_UNCHECKED;
53-
54- if (in_valgrind == GST_VG_UNCHECKED) {
55-#ifdef HAVE_VALGRIND_VALGRIND_H
56- if (RUNNING_ON_VALGRIND) {
57- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind");
58- in_valgrind = GST_VG_INSIDE;
59- } else {
60- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff");
61- in_valgrind = GST_VG_NO_VALGRIND;
62- }
63-#else
64- in_valgrind = GST_VG_NO_VALGRIND;
65-#endif
66- g_assert (in_valgrind == GST_VG_NO_VALGRIND ||
67- in_valgrind == GST_VG_INSIDE);
68- }
69- return (in_valgrind == GST_VG_INSIDE);
70-}
71-
72 static gchar *
73 _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token,
74 guint val)
75@@ -463,9 +433,6 @@ _priv_gst_debug_init (void)
76 _priv_GST_CAT_PROTECTION =
77 _gst_debug_category_new ("GST_PROTECTION", 0, "protection");
78
79- /* print out the valgrind message if we're in valgrind */
80- _priv_gst_in_valgrind ();
81-
82 env = g_getenv ("GST_DEBUG_OPTIONS");
83 if (env != NULL) {
84 if (strstr (env, "full_tags") || strstr (env, "full-tags"))
85@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo)
86 return 0;
87 }
88
89-gboolean
90-_priv_gst_in_valgrind (void)
91-{
92- return FALSE;
93-}
94-
95 void
96 _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file,
97 const gchar * func, gint line, GObject * obj, const gchar * msg,
98diff --git a/meson.build b/meson.build
99index 82a1728..42ae617 100644
100--- a/meson.build
101+++ b/meson.build
102@@ -200,7 +200,6 @@ check_headers = [
103 'sys/wait.h',
104 'ucontext.h',
105 'unistd.h',
106- 'valgrind/valgrind.h',
107 'sys/resource.h',
108 'sys/uio.h',
109 ]
110--
1112.29.2
112
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
index b77fb5797f..d18c19c397 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch
@@ -1,4 +1,4 @@
1From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 Mon Sep 17 00:00:00 2001 1From 62f5bb7bfc2498219df7280e73480d8ed2378ce5 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com> 2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 11 Apr 2021 19:48:13 +0100 3Date: Sun, 11 Apr 2021 19:48:13 +0100
4Subject: [PATCH 2/4] tests: add support for install the tests 4Subject: [PATCH 2/4] tests: add support for install the tests
@@ -11,54 +11,44 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-
11 11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> 12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13--- 13---
14 meson.build | 5 +++++ 14 subprojects/gstreamer/meson.build | 4 ++++
15 meson_options.txt | 1 + 15 subprojects/gstreamer/meson_options.txt | 1 +
16 template.test.in | 3 +++ 16 subprojects/gstreamer/tests/check/meson.build | 22 ++++++++++++++++++-
17 tests/check/meson.build | 22 +++++++++++++++++++++- 17 .../gstreamer/tests/check/template.test.in | 3 +++
18 4 files changed, 30 insertions(+), 1 deletion(-) 18 4 files changed, 29 insertions(+), 1 deletion(-)
19 create mode 100644 template.test.in 19 create mode 100644 subprojects/gstreamer/tests/check/template.test.in
20 20
21diff --git a/meson.build b/meson.build 21diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build
22index c4e8774f5..1abf4eb26 100644 22index d20fe0040f..b595d8f990 100644
23--- a/meson.build 23--- a/subprojects/gstreamer/meson.build
24+++ b/meson.build 24+++ b/subprojects/gstreamer/meson.build
25@@ -562,6 +562,11 @@ if bashcomp_dep.found() 25@@ -562,6 +562,10 @@ if bashcomp_dep.found()
26 endif 26 endif
27 endif 27 endif
28 28
29+installed_tests_enabled = get_option('installed_tests')
29+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name()) 30+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
30+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name()) 31+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
31+installed_tests_enabled = get_option('installed-tests')
32+installed_tests_template = files('template.test.in')
33+ 32+
34 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') 33 plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0')
35 34
36 pkgconfig = import('pkgconfig') 35 pkgconfig = import('pkgconfig')
37diff --git a/meson_options.txt b/meson_options.txt 36diff --git a/subprojects/gstreamer/meson_options.txt b/subprojects/gstreamer/meson_options.txt
38index c8cee3762..b5da40eaa 100644 37index 7363bdb7a1..a34ba37dad 100644
39--- a/meson_options.txt 38--- a/subprojects/gstreamer/meson_options.txt
40+++ b/meson_options.txt 39+++ b/subprojects/gstreamer/meson_options.txt
41@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso 40@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso
42 option('memory-alignment', type: 'combo', 41 option('memory-alignment', type: 'combo',
43 choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], 42 choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'],
44 value: 'malloc') 43 value: 'malloc')
45+option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests') 44+option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests')
46 45
47 # Feature options 46 # Feature options
48 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') 47 option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
49diff --git a/template.test.in b/template.test.in 48diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
50new file mode 100644 49index 506606684d..00a138a568 100644
51index 000000000..f701627f8 50--- a/subprojects/gstreamer/tests/check/meson.build
52--- /dev/null 51+++ b/subprojects/gstreamer/tests/check/meson.build
53+++ b/template.test.in
54@@ -0,0 +1,3 @@
55+[Test]
56+Type=session
57+Exec=@installed_tests_dir@/@program@
58diff --git a/tests/check/meson.build b/tests/check/meson.build
59index b2636714b..a697a7b06 100644
60--- a/tests/check/meson.build
61+++ b/tests/check/meson.build
62@@ -124,10 +124,16 @@ test_defines = [ 52@@ -124,10 +124,16 @@ test_defines = [
63 '-UG_DISABLE_ASSERT', 53 '-UG_DISABLE_ASSERT',
64 '-UG_DISABLE_CAST_CHECKS', 54 '-UG_DISABLE_CAST_CHECKS',
@@ -95,7 +85,7 @@ index b2636714b..a697a7b06 100644
95+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) 85+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir))
96+ test_conf.set('program', test_name) 86+ test_conf.set('program', test_name)
97+ configure_file( 87+ configure_file(
98+ input: installed_tests_template, 88+ input: 'template.test.in',
99+ output: test_name + '.test', 89+ output: test_name + '.test',
100+ install_dir: installed_tests_metadir, 90+ install_dir: installed_tests_metadir,
101+ configuration: test_conf 91+ configuration: test_conf
@@ -105,6 +95,15 @@ index b2636714b..a697a7b06 100644
105 test(test_name, exe, env: env, timeout : 3 * 60) 95 test(test_name, exe, env: env, timeout : 3 * 60)
106 endif 96 endif
107 endforeach 97 endforeach
98diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
99new file mode 100644
100index 0000000000..f701627f87
101--- /dev/null
102+++ b/subprojects/gstreamer/tests/check/template.test.in
103@@ -0,0 +1,3 @@
104+[Test]
105+Type=session
106+Exec=@installed_tests_dir@/@program@
108-- 107--
1092.31.1 1082.33.1
110 109
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch
deleted file mode 100644
index e0e64e2c7a..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch
+++ /dev/null
@@ -1,32 +0,0 @@
1From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001
2From: Seungha Yang <seungha@centricular.com>
3Date: Tue, 15 Sep 2020 00:54:58 +0900
4Subject: [PATCH] tests: seek: Don't use too strict timeout for validation
5
6Expected segment-done message might not be seen within expected
7time if system is not powerful enough.
8
9Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625>
10
11Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c]
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 tests/check/pipelines/seek.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c
18index 28bb8846d..5f7447bc5 100644
19--- a/tests/check/pipelines/seek.c
20+++ b/tests/check/pipelines/seek.c
21@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2)
22
23 GST_INFO ("wait for segment done message");
24
25- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND,
26+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
27 GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR);
28 fail_unless (msg, "no message within the timed window");
29 fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done");
30--
312.29.2
32
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
index 46813cec3d..10a6dcc619 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch
@@ -1,4 +1,4 @@
1From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001 1From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com> 2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sat, 24 Apr 2021 10:34:47 +0100 3Date: Sat, 24 Apr 2021 10:34:47 +0100
4Subject: [PATCH 3/4] tests: use a dictionaries for environment 4Subject: [PATCH 3/4] tests: use a dictionaries for environment
@@ -10,29 +10,31 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-
10 10
11Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> 11Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
12--- 12---
13 tests/check/meson.build | 19 +++++++++++-------- 13 subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++-------
14 1 file changed, 11 insertions(+), 8 deletions(-) 14 1 file changed, 13 insertions(+), 8 deletions(-)
15 15
16diff --git a/tests/check/meson.build b/tests/check/meson.build 16diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
17index a697a7b06..f64524904 100644 17index 00a138a568..48ec2532f8 100644
18--- a/tests/check/meson.build 18--- a/subprojects/gstreamer/tests/check/meson.build
19+++ b/tests/check/meson.build 19+++ b/subprojects/gstreamer/tests/check/meson.build
20@@ -161,14 +161,17 @@ foreach t : core_tests 20@@ -161,14 +161,19 @@ foreach t : core_tests
21 install: installed_tests_enabled, 21 install: installed_tests_enabled,
22 ) 22 )
23 23
24- env = environment() 24- env = environment()
25- env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) 25- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root())
26- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') 26- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
27- env.set('GST_STATE_IGNORE_ELEMENTS', '') 27- env.set('GST_STATE_IGNORE_ELEMENTS', '')
28- env.set('CK_DEFAULT_TIMEOUT', '20') 28- env.set('CK_DEFAULT_TIMEOUT', '20')
29- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) 29- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
30- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') 30- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner')
31- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') 31- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer')
32+ # environment() can't be passed to configure_file and it is needed for installed_tests 32+ # meson environment object can't be passed to configure_file and
33+ # use a dictionary as this is simplest solution to install the environment 33+ # installed tests uses configure_file to install the environment.
34+ # use a dictionary as this is the simplest solution
35+ # to install the environment.
34+ env = { 36+ env = {
35+ 'GST_PLUGIN_PATH_1_0': meson.build_root(), 37+ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(),
36+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '', 38+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '',
37+ 'GST_STATE_IGNORE_ELEMENTS': '', 39+ 'GST_STATE_IGNORE_ELEMENTS': '',
38+ 'CK_DEFAULT_TIMEOUT': '20', 40+ 'CK_DEFAULT_TIMEOUT': '20',
@@ -44,5 +46,5 @@ index a697a7b06..f64524904 100644
44 if installed_tests_enabled 46 if installed_tests_enabled
45 test_conf = configuration_data() 47 test_conf = configuration_data()
46-- 48--
472.31.1 492.33.1
48 50
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
new file mode 100644
index 0000000000..efa004f8ce
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch
@@ -0,0 +1,74 @@
1From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 2 May 2021 01:58:01 +0100
4Subject: [PATCH 4/4] tests: add helper script to run the installed_tests
5
6- this is a bash script that will run the installed_tests
7with some of the environment variables used in the meson
8testing framework.
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13---
14 subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++
15 .../gstreamer/tests/check/template.sh.in | 9 +++++++++
16 .../gstreamer/tests/check/template.test.in | 2 +-
17 3 files changed, 27 insertions(+), 1 deletion(-)
18 create mode 100755 subprojects/gstreamer/tests/check/template.sh.in
19
20diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build
21index 48ec2532f8..7dc4990d4e 100644
22--- a/subprojects/gstreamer/tests/check/meson.build
23+++ b/subprojects/gstreamer/tests/check/meson.build
24@@ -185,6 +185,23 @@ foreach t : core_tests
25 install_dir: installed_tests_metadir,
26 configuration: test_conf
27 )
28+
29+ # All the tests will be deployed on the target machine and
30+ # we use the home folder ~ for the registry which will then expand at runtime.
31+ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly
32+ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry
33+ # that is useful for debug propose of the tests itself.
34+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
35+
36+ # Set the full path for the test it self.
37+ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)}
38+
39+ configure_file(
40+ input : 'template.sh.in',
41+ output: test_name + '.sh',
42+ install_dir: installed_tests_execdir,
43+ configuration : env,
44+ )
45 endif
46
47 test(test_name, exe, env: env, timeout : 3 * 60)
48diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in
49new file mode 100755
50index 0000000000..cf7d31b0ea
51--- /dev/null
52+++ b/subprojects/gstreamer/tests/check/template.sh.in
53@@ -0,0 +1,9 @@
54+#!/bin/sh
55+
56+set -ax
57+
58+CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@"
59+GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@"
60+GST_REGISTRY=@GST_REGISTRY@
61+GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@"
62+exec @TEST@
63diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in
64index f701627f87..b74ef6ad73 100644
65--- a/subprojects/gstreamer/tests/check/template.test.in
66+++ b/subprojects/gstreamer/tests/check/template.test.in
67@@ -1,3 +1,3 @@
68 [Test]
69 Type=session
70-Exec=@installed_tests_dir@/@program@
71+Exec=@installed_tests_dir@/@program@.sh
72--
732.33.1
74
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch
deleted file mode 100644
index eabe7bcbe1..0000000000
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1From 57d2965e979f886e03eecd7e351bf01812053971 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <quaresma.jose@gmail.com>
3Date: Sun, 2 May 2021 01:58:01 +0100
4Subject: [PATCH 4/4] tests: install the environment for installed_tests
5
6- adapt the test environment for installed_tests
7- install the test environment for installed_tests
8- run the tests using the installed environment
9
10Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789]
11
12Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
13---
14 template.test.in | 2 +-
15 tests/check/meson.build | 18 ++++++++++++++++++
16 2 files changed, 19 insertions(+), 1 deletion(-)
17
18diff --git a/template.test.in b/template.test.in
19index f701627f8..9a3fbdd09 100644
20--- a/template.test.in
21+++ b/template.test.in
22@@ -1,3 +1,3 @@
23 [Test]
24 Type=session
25-Exec=@installed_tests_dir@/@program@
26+Exec=sh -c 'set -aex && source @installed_tests_dir@/@program@.env && exec @installed_tests_dir@/@program@'
27diff --git a/tests/check/meson.build b/tests/check/meson.build
28index f64524904..a67e0f8dd 100644
29--- a/tests/check/meson.build
30+++ b/tests/check/meson.build
31@@ -183,6 +183,24 @@ foreach t : core_tests
32 install_dir: installed_tests_metadir,
33 configuration: test_conf
34 )
35+
36+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)}
37+ configure_file(
38+ output: test_name + '.env',
39+ install_dir: installed_tests_execdir,
40+ configuration : env,
41+ )
42+ # helper to convert a meson environment dictionay object exported with configure_file
43+ # this also remove not needed variables for the installed tests
44+ meson.add_postconf_script('sed', '-i',
45+ '-e', '/^#define/!d',
46+ '-e', 's/^#define //g',
47+ '-e', '/^GST_PLUGIN_PATH_1_0/d',
48+ '-e', '/^GST_PLUGIN_SYSTEM_PATH_1_0/d',
49+ '-e', '/^GST_PLUGIN_SCANNER_1_0/d',
50+ '-e', 's/ /=/',
51+ join_paths(meson.current_build_dir(), test_name + '.env')
52+ )
53 endif
54
55 test(test_name, exe, env: env, timeout : 3 * 60)
56--
572.31.1
58
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.0.bb
index 0d82dd338c..243f99fee9 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.18.5.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.0.bb
@@ -10,22 +10,19 @@ DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native"
10 10
11inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome 11inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome
12 12
13LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ 13LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770 \
14 file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" 14 file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
15 15
16S = "${WORKDIR}/gstreamer-${PV}" 16S = "${WORKDIR}/gstreamer-${PV}"
17 17
18SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ 18SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
19 file://run-ptest \ 19 file://run-ptest \
20 file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ 20 file://0001-tests-respect-the-idententaion-used-in-meson.patch;striplevel=3 \
21 file://0002-Remove-unused-valgrind-detection.patch \ 21 file://0002-tests-add-support-for-install-the-tests.patch;striplevel=3 \
22 file://0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \ 22 file://0003-tests-use-a-dictionaries-for-environment.patch;striplevel=3 \
23 file://0004-tests-respect-the-idententaion-used-in-meson.patch \ 23 file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
24 file://0005-tests-add-support-for-install-the-tests.patch \
25 file://0006-tests-use-a-dictionaries-for-environment.patch \
26 file://0007-tests-install-the-environment-for-installed_tests.patch \
27 " 24 "
28SRC_URI[sha256sum] = "55862232a63459bbf56abebde3085ca9aec211b478e891dacea4d6df8cafe80a" 25SRC_URI[sha256sum] = "edf4bffff85591d4fff7b21bb9ed7f0feabc123ac4a4eff29e73cbce454f9db7"
29 26
30PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ 27PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
31 check \ 28 check \
@@ -36,7 +33,7 @@ PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false"
36PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" 33PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false"
37PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled" 34PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled"
38PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" 35PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled"
39PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" 36PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled_tests=true,-Dtests=disabled -Dinstalled_tests=false"
40PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" 37PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
41PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" 38PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils"
42PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" 39PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion"