diff options
| author | Tom Hochstein <tom.hochstein@nxp.com> | 2021-08-30 15:35:29 -0500 |
|---|---|---|
| committer | Tom Hochstein <tom.hochstein@nxp.com> | 2021-08-30 15:35:29 -0500 |
| commit | 0b35cb16401ec2df48d4b68f941744fdfaada2aa (patch) | |
| tree | 1b9bdcc45dded1cf14880f9ad078fbc4b4191a81 | |
| parent | abd9ea654450bf907b8e3c2adada78b73736e209 (diff) | |
| download | meta-freescale-0b35cb16401ec2df48d4b68f941744fdfaada2aa.tar.gz | |
gstreamer1.0: Upgrade to 1.18.0.imx
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
14 files changed, 465 insertions, 462 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc b/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc deleted file mode 100644 index b69806704..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | inherit ptest-gnome | ||
| 2 | |||
| 3 | TEST_FILES_PATH = "${datadir}/installed-tests/gstreamer-1.0/test-files" | ||
| 4 | RUN_PTEST_FILE = "${D}${PTEST_PATH}/run-ptest" | ||
| 5 | |||
| 6 | EXTRA_OEMESON += "-Dtest-files-path=${TEST_FILES_PATH}" | ||
| 7 | |||
| 8 | GST_TEST_SUITE_NAME ?= "gstreamer-1.0" | ||
| 9 | |||
| 10 | # Using do_install_ptest_base instead of do_install_ptest, since | ||
| 11 | # the default do_install_ptest_base is hardcoded to expect Makefiles. | ||
| 12 | do_install_ptest_base() { | ||
| 13 | # Generate run-ptest file | ||
| 14 | echo "#!/usr/bin/env sh" > "${RUN_PTEST_FILE}" | ||
| 15 | echo "gnome-desktop-testing-runner ${GST_TEST_SUITE_NAME}" >> "${RUN_PTEST_FILE}" | ||
| 16 | chmod 0755 "${RUN_PTEST_FILE}" | ||
| 17 | |||
| 18 | # Install additional files required by tests | ||
| 19 | if [ -d "${S}/tests/files" ] ; then | ||
| 20 | install -d "${D}/${TEST_FILES_PATH}" | ||
| 21 | install -m 0644 "${S}/tests/files"/* "${D}/${TEST_FILES_PATH}" | ||
| 22 | fi | ||
| 23 | } | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch index 67a872cdd..23ebd5c60 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch | |||
| @@ -1,25 +1,44 @@ | |||
| 1 | From a1d7c582392c8bc87fa9411af77b20e011944357 Mon Sep 17 00:00:00 2001 | 1 | From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Jose Quaresma <quaresma.jose@gmail.com> |
| 3 | Date: Thu, 25 Jan 2018 17:55:02 +0200 | 3 | Date: Sat, 10 Oct 2020 19:09:03 +0000 |
| 4 | Subject: [PATCH] gst/gstpluginloader.c: when env var is set do not fall | 4 | Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through |
| 5 | through to system plugin scanner | 5 | to system plugin scanner |
| 6 | 6 | ||
| 7 | If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. | 7 | If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. |
| 8 | 8 | ||
| 9 | Falling through to the one installed on the system is problamatic in cross-compilation | 9 | Falling through to the one installed on the system is problamatic in cross-compilation |
| 10 | environemnts, regardless of whether one pointed to by the env var succeeded or failed. | 10 | environemnts, regardless of whether one pointed to by the env var succeeded or failed. |
| 11 | 11 | ||
| 12 | Upstream-Status: Pending | 12 | taken from: |
| 13 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 13 | http://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 | |||
| 15 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669> | ||
| 16 | |||
| 17 | Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a] | ||
| 18 | |||
| 19 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 14 | --- | 20 | --- |
| 15 | gst/gstpluginloader.c | 4 +--- | 21 | gst/gstpluginloader.c | 15 +++++++-------- |
| 16 | 1 file changed, 1 insertion(+), 3 deletions(-) | 22 | 1 file changed, 7 insertions(+), 8 deletions(-) |
| 17 | 23 | ||
| 18 | diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c | 24 | diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c |
| 19 | index 430829d..3a75731 100644 | 25 | index d1e404d98..c626bf263 100644 |
| 20 | --- a/gst/gstpluginloader.c | 26 | --- a/gst/gstpluginloader.c |
| 21 | +++ b/gst/gstpluginloader.c | 27 | +++ b/gst/gstpluginloader.c |
| 22 | @@ -471,9 +471,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) | 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); | ||
| 23 | helper_bin = g_strdup (env); | 42 | helper_bin = g_strdup (env); |
| 24 | res = gst_plugin_loader_try_helper (loader, helper_bin); | 43 | res = gst_plugin_loader_try_helper (loader, helper_bin); |
| 25 | g_free (helper_bin); | 44 | g_free (helper_bin); |
| @@ -27,9 +46,24 @@ index 430829d..3a75731 100644 | |||
| 27 | - | 46 | - |
| 28 | - if (!res) { | 47 | - if (!res) { |
| 29 | + } else { | 48 | + } else { |
| 49 | + /* use the installed version */ | ||
| 30 | GST_LOG ("Trying installed plugin scanner"); | 50 | GST_LOG ("Trying installed plugin scanner"); |
| 31 | 51 | ||
| 32 | #ifdef G_OS_WIN32 | 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; | ||
| 33 | -- | 67 | -- |
| 34 | 2.15.1 | 68 | 2.29.2 |
| 35 | 69 | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch new file mode 100644 index 000000000..96abef17b --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch | |||
| @@ -0,0 +1,112 @@ | |||
| 1 | From 598d108e2c438d8f2ecd3bf948fa3ebbd3681490 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> | ||
| 3 | Date: Fri, 14 Aug 2020 16:38:26 +0100 | ||
| 4 | Subject: [PATCH 2/3] Remove unused valgrind detection | ||
| 5 | |||
| 6 | Having this just to log a debug message in case we're | ||
| 7 | running inside valgrind doesn't seem very useful, and | ||
| 8 | the code that used to use this no longer exists it seems. | ||
| 9 | |||
| 10 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595> | ||
| 11 | |||
| 12 | Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245] | ||
| 13 | |||
| 14 | Signed-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 | |||
| 21 | diff --git a/gst/gst_private.h b/gst/gst_private.h | ||
| 22 | index eefd044d9..8252ede51 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); | ||
| 34 | diff --git a/gst/gstinfo.c b/gst/gstinfo.c | ||
| 35 | index 5d317877b..097f8b20d 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 volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; | ||
| 40 | static volatile 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 | @@ -2503,12 +2470,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, | ||
| 98 | diff --git a/meson.build b/meson.build | ||
| 99 | index ce1921aa4..7a84d0981 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 | -- | ||
| 111 | 2.29.2 | ||
| 112 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch deleted file mode 100644 index 1ed7198a5..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | From 35db4a2433fbdf8612cf98b5aab5b14aeb5372f8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> | ||
| 3 | Date: Thu, 17 Oct 2019 12:13:35 +0100 | ||
| 4 | Subject: [PATCH] meson: build gir even when cross-compiling if introspection | ||
| 5 | was enabled explicitly | ||
| 6 | |||
| 7 | This can be made to work in certain circumstances when | ||
| 8 | cross-compiling, so default to not building g-i stuff | ||
| 9 | when cross-compiling, but allow it if introspection was | ||
| 10 | enabled explicitly via -Dintrospection=enabled. | ||
| 11 | |||
| 12 | Fixes #454 and #381. | ||
| 13 | |||
| 14 | Upstream-Status: Backport [35db4a2433fbdf8612cf98b5aab5b14aeb5372f8] | ||
| 15 | |||
| 16 | Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 17 | --- | ||
| 18 | meson.build | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/meson.build b/meson.build | ||
| 22 | index 90d98d8eb..a47e7f34e 100644 | ||
| 23 | --- a/meson.build | ||
| 24 | +++ b/meson.build | ||
| 25 | @@ -466,7 +466,7 @@ rt_lib = cc.find_library('rt', required : false) | ||
| 26 | gir = find_program('g-ir-scanner', required : get_option('introspection')) | ||
| 27 | gnome = import('gnome') | ||
| 28 | |||
| 29 | -build_gir = gir.found() and not meson.is_cross_build() | ||
| 30 | +build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) | ||
| 31 | |||
| 32 | gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ | ||
| 33 | 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ | ||
| 34 | -- | ||
| 35 | 2.17.1 | ||
| 36 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch deleted file mode 100644 index f553340f4..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch +++ /dev/null | |||
| @@ -1,74 +0,0 @@ | |||
| 1 | From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 3 | Date: Sun, 20 Oct 2019 10:36:44 +0200 | ||
| 4 | Subject: [PATCH] meson: Add valgrind feature | ||
| 5 | |||
| 6 | This allows for enabling/disabling Valgrind support. Since Valgrind is | ||
| 7 | an external dependency, such a feature is needed by build environemnts | ||
| 8 | such as Yocto to make sure builds are deterministic. These changes also | ||
| 9 | add more Valgrind specific configure log output. | ||
| 10 | |||
| 11 | Upstream-Status: Pending | ||
| 12 | |||
| 13 | Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 14 | --- | ||
| 15 | meson.build | 23 ++++++++++++++++++++++- | ||
| 16 | meson_options.txt | 1 + | ||
| 17 | 2 files changed, 23 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/meson.build b/meson.build | ||
| 20 | index b55ecc5..4751761 100644 | ||
| 21 | --- a/meson.build | ||
| 22 | +++ b/meson.build | ||
| 23 | @@ -199,7 +199,6 @@ check_headers = [ | ||
| 24 | 'sys/wait.h', | ||
| 25 | 'ucontext.h', | ||
| 26 | 'unistd.h', | ||
| 27 | - 'valgrind/valgrind.h', | ||
| 28 | 'sys/resource.h', | ||
| 29 | ] | ||
| 30 | |||
| 31 | @@ -214,6 +213,28 @@ foreach h : check_headers | ||
| 32 | endif | ||
| 33 | endforeach | ||
| 34 | |||
| 35 | +valgrind_option = get_option('valgrind') | ||
| 36 | +if valgrind_option.disabled() | ||
| 37 | + message('Valgrind support not requested; disabled.') | ||
| 38 | +else | ||
| 39 | + valgrind_header = 'valgrind/valgrind.h' | ||
| 40 | + has_valgrind_header = cc.has_header(valgrind_header) | ||
| 41 | + if has_valgrind_header | ||
| 42 | + message('Valgrind support requested, and header ' + valgrind_header + \ | ||
| 43 | + ' found. Enabled Valgrind support.') | ||
| 44 | + define = 'HAVE_' + valgrind_header.underscorify().to_upper() | ||
| 45 | + cdata.set(define, 1) | ||
| 46 | + else | ||
| 47 | + if valgrind_option.enabled() | ||
| 48 | + error('Valgrind support requested and set as required, but header ' + \ | ||
| 49 | + valgrind_header + ' not found.') | ||
| 50 | + else | ||
| 51 | + message('Valgrind support requested, but header ' + valgrind_header + \ | ||
| 52 | + ' not found. Disabling Valgrind support.') | ||
| 53 | + endif | ||
| 54 | + endif | ||
| 55 | +endif | ||
| 56 | + | ||
| 57 | if cc.has_member('struct tm', 'tm_gmtoff', prefix : '#include <time.h>') | ||
| 58 | cdata.set('HAVE_TM_GMTOFF', 1) | ||
| 59 | endif | ||
| 60 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 61 | index e7ff7ba..8afde39 100644 | ||
| 62 | --- a/meson_options.txt | ||
| 63 | +++ b/meson_options.txt | ||
| 64 | @@ -19,6 +19,7 @@ option('memory-alignment', type: 'combo', | ||
| 65 | |||
| 66 | # Feature options | ||
| 67 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') | ||
| 68 | +option('valgrind', type : 'feature', value : 'auto', description : 'Enable Valgrind support') | ||
| 69 | option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces') | ||
| 70 | option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') | ||
| 71 | option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') | ||
| 72 | -- | ||
| 73 | 2.17.1 | ||
| 74 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch new file mode 100644 index 000000000..e0e64e2c7 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Seungha Yang <seungha@centricular.com> | ||
| 3 | Date: Tue, 15 Sep 2020 00:54:58 +0900 | ||
| 4 | Subject: [PATCH] tests: seek: Don't use too strict timeout for validation | ||
| 5 | |||
| 6 | Expected segment-done message might not be seen within expected | ||
| 7 | time if system is not powerful enough. | ||
| 8 | |||
| 9 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/625> | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c] | ||
| 12 | Signed-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 | |||
| 17 | diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c | ||
| 18 | index 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 | -- | ||
| 31 | 2.29.2 | ||
| 32 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch deleted file mode 100644 index 0e6c44ea3..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch +++ /dev/null | |||
| @@ -1,257 +0,0 @@ | |||
| 1 | From b843400284751968862751dfe93853f151551c64 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 3 | Date: Fri, 25 Oct 2019 00:06:26 +0200 | ||
| 4 | Subject: [PATCH] meson: Add option for installed tests | ||
| 5 | |||
| 6 | This adds an option for producing installed versions of the unit tests. | ||
| 7 | These versions don't need meson to run (only a small shell script). This | ||
| 8 | makes it easier to run cross compiled tests on a target machine. | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> | ||
| 13 | --- | ||
| 14 | build-aux/gen-installed-test-desc.py | 18 ++++++ | ||
| 15 | build-aux/gen-installed-test-shscript.py | 25 ++++++++ | ||
| 16 | meson_options.txt | 2 + | ||
| 17 | tests/check/meson.build | 46 +++++++++++++- | ||
| 18 | tests/files/testfile | 80 ++++++++++++++++++++++++ | ||
| 19 | 5 files changed, 170 insertions(+), 1 deletion(-) | ||
| 20 | create mode 100644 build-aux/gen-installed-test-desc.py | ||
| 21 | create mode 100644 build-aux/gen-installed-test-shscript.py | ||
| 22 | create mode 100644 tests/files/testfile | ||
| 23 | |||
| 24 | diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py | ||
| 25 | new file mode 100644 | ||
| 26 | index 0000000..69e8a0f | ||
| 27 | --- /dev/null | ||
| 28 | +++ b/build-aux/gen-installed-test-desc.py | ||
| 29 | @@ -0,0 +1,18 @@ | ||
| 30 | +import sys | ||
| 31 | +import os | ||
| 32 | +import argparse | ||
| 33 | + | ||
| 34 | +def write_template(filename, data): | ||
| 35 | + with open(filename, 'w') as f: | ||
| 36 | + f.write(data) | ||
| 37 | + | ||
| 38 | +def build_template(testdir, testname): | ||
| 39 | + return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname)) | ||
| 40 | + | ||
| 41 | +argparser = argparse.ArgumentParser(description='Generate installed-test data.') | ||
| 42 | +argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') | ||
| 43 | +argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') | ||
| 44 | +argparser.add_argument('--output', metavar='file', required=True, help='Output file') | ||
| 45 | +args = argparser.parse_args() | ||
| 46 | + | ||
| 47 | +write_template(args.output, build_template(args.test_execdir, args.testname)) | ||
| 48 | diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py | ||
| 49 | new file mode 100644 | ||
| 50 | index 0000000..5da86fb | ||
| 51 | --- /dev/null | ||
| 52 | +++ b/build-aux/gen-installed-test-shscript.py | ||
| 53 | @@ -0,0 +1,25 @@ | ||
| 54 | +import sys | ||
| 55 | +import os | ||
| 56 | +import argparse | ||
| 57 | + | ||
| 58 | +def write_template(filename, data): | ||
| 59 | + with open(filename, 'w') as f: | ||
| 60 | + f.write(data) | ||
| 61 | + | ||
| 62 | +def build_template(testdir, testname): | ||
| 63 | + return ''.join([ | ||
| 64 | + "#!/usr/bin/env sh\n", | ||
| 65 | + "export GST_STATE_IGNORE_ELEMENTS=''\n", | ||
| 66 | + "export CK_DEFAULT_TIMEOUT=20\n", | ||
| 67 | + "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n", | ||
| 68 | + "{}\n".format(os.path.join(testdir, testname)), | ||
| 69 | + ]) | ||
| 70 | + | ||
| 71 | +argparser = argparse.ArgumentParser(description='Generate installed-test data.') | ||
| 72 | +argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') | ||
| 73 | +argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') | ||
| 74 | +argparser.add_argument('--output', metavar='file', required=True, help='Output file') | ||
| 75 | +args = argparser.parse_args() | ||
| 76 | + | ||
| 77 | +write_template(args.output, build_template(args.test_execdir, args.testname)) | ||
| 78 | +os.chmod(args.output, 0o755) | ||
| 79 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 80 | index 8afde39..8884dcc 100644 | ||
| 81 | --- a/meson_options.txt | ||
| 82 | +++ b/meson_options.txt | ||
| 83 | @@ -16,6 +16,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso | ||
| 84 | option('memory-alignment', type: 'combo', | ||
| 85 | choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], | ||
| 86 | value: 'malloc') | ||
| 87 | +option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests') | ||
| 88 | +option('test-files-path', type : 'string', description : 'Path where to find test files') | ||
| 89 | |||
| 90 | # Feature options | ||
| 91 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') | ||
| 92 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
| 93 | index 04da83f..2db7f76 100644 | ||
| 94 | --- a/tests/check/meson.build | ||
| 95 | +++ b/tests/check/meson.build | ||
| 96 | @@ -118,11 +118,17 @@ if add_languages('cpp', required : false) | ||
| 97 | ] | ||
| 98 | endif | ||
| 99 | |||
| 100 | +test_files_path = get_option('test-files-path') | ||
| 101 | +if test_files_path == '' | ||
| 102 | + test_files_path = meson.current_source_dir() + '/../files' | ||
| 103 | +endif | ||
| 104 | +message('Using path "@0@" as the path to read test files from'.format(test_files_path)) | ||
| 105 | + | ||
| 106 | test_defines = [ | ||
| 107 | '-UG_DISABLE_ASSERT', | ||
| 108 | '-UG_DISABLE_CAST_CHECKS', | ||
| 109 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', | ||
| 110 | - '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', | ||
| 111 | + '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'), | ||
| 112 | '-DGST_USE_UNSTABLE_API', | ||
| 113 | '-DGST_DISABLE_DEPRECATED', | ||
| 114 | ] | ||
| 115 | @@ -137,6 +143,14 @@ endif | ||
| 116 | glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep] | ||
| 117 | gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep] | ||
| 118 | |||
| 119 | +installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0') | ||
| 120 | +installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0') | ||
| 121 | +installed_tests_enabled = get_option('installed-tests') | ||
| 122 | + | ||
| 123 | +python = import('python').find_installation() | ||
| 124 | +gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py') | ||
| 125 | +gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py') | ||
| 126 | + | ||
| 127 | foreach t : core_tests | ||
| 128 | fname = t[0] | ||
| 129 | test_name = fname.split('.')[0].underscorify() | ||
| 130 | @@ -150,8 +164,38 @@ foreach t : core_tests | ||
| 131 | include_directories : [configinc], | ||
| 132 | link_with : link_with_libs, | ||
| 133 | dependencies : test_deps + glib_deps + gst_deps, | ||
| 134 | + install_dir: installed_tests_execdir, | ||
| 135 | + install: installed_tests_enabled | ||
| 136 | ) | ||
| 137 | |||
| 138 | + if installed_tests_enabled | ||
| 139 | + installed_test_shscript = test_name + '.sh' | ||
| 140 | + shscript = custom_target (test_name + '_shscript', | ||
| 141 | + output: installed_test_shscript, | ||
| 142 | + command: [ | ||
| 143 | + python, | ||
| 144 | + gen_installed_test_shscript, | ||
| 145 | + '--test-execdir=@0@'.format(installed_tests_execdir), | ||
| 146 | + '--testname=@0@'.format(test_name), | ||
| 147 | + '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)), | ||
| 148 | + ], | ||
| 149 | + install: true, | ||
| 150 | + install_dir: installed_tests_execdir) | ||
| 151 | + | ||
| 152 | + installed_test_desc = test_name + '.test' | ||
| 153 | + data = custom_target(test_name + '_desc', | ||
| 154 | + output: installed_test_desc, | ||
| 155 | + command: [ | ||
| 156 | + python, | ||
| 157 | + gen_installed_test_desc, | ||
| 158 | + '--test-execdir=@0@'.format(installed_tests_execdir), | ||
| 159 | + '--testname=@0@'.format(installed_test_shscript), | ||
| 160 | + '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)), | ||
| 161 | + ], | ||
| 162 | + install: true, | ||
| 163 | + install_dir: installed_tests_datadir) | ||
| 164 | + endif | ||
| 165 | + | ||
| 166 | env = environment() | ||
| 167 | env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) | ||
| 168 | env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') | ||
| 169 | diff --git a/tests/files/testfile b/tests/files/testfile | ||
| 170 | new file mode 100644 | ||
| 171 | index 0000000..89954e0 | ||
| 172 | --- /dev/null | ||
| 173 | +++ b/tests/files/testfile | ||
| 174 | @@ -0,0 +1,80 @@ | ||
| 175 | +................................................................................ | ||
| 176 | +................................................................................ | ||
| 177 | +................................................................................ | ||
| 178 | +................................................................................ | ||
| 179 | +................................................................................ | ||
| 180 | +................................................................................ | ||
| 181 | +................................................................................ | ||
| 182 | +................................................................................ | ||
| 183 | +................................................................................ | ||
| 184 | +................................................................................ | ||
| 185 | +................................................................................ | ||
| 186 | +................................................................................ | ||
| 187 | +................................................................................ | ||
| 188 | +................................................................................ | ||
| 189 | +................................................................................ | ||
| 190 | +................................................................................ | ||
| 191 | +................................................................................ | ||
| 192 | +................................................................................ | ||
| 193 | +................................................................................ | ||
| 194 | +................................................................................ | ||
| 195 | +................................................................................ | ||
| 196 | +................................................................................ | ||
| 197 | +................................................................................ | ||
| 198 | +................................................................................ | ||
| 199 | +................................................................................ | ||
| 200 | +................................................................................ | ||
| 201 | +................................................................................ | ||
| 202 | +................................................................................ | ||
| 203 | +................................................................................ | ||
| 204 | +................................................................................ | ||
| 205 | +................................................................................ | ||
| 206 | +................................................................................ | ||
| 207 | +................................................................................ | ||
| 208 | +................................................................................ | ||
| 209 | +................................................................................ | ||
| 210 | +................................................................................ | ||
| 211 | +................................................................................ | ||
| 212 | +................................................................................ | ||
| 213 | +................................................................................ | ||
| 214 | +................................................................................ | ||
| 215 | +................................................................................ | ||
| 216 | +................................................................................ | ||
| 217 | +................................................................................ | ||
| 218 | +................................................................................ | ||
| 219 | +................................................................................ | ||
| 220 | +................................................................................ | ||
| 221 | +................................................................................ | ||
| 222 | +................................................................................ | ||
| 223 | +................................................................................ | ||
| 224 | +................................................................................ | ||
| 225 | +................................................................................ | ||
| 226 | +................................................................................ | ||
| 227 | +................................................................................ | ||
| 228 | +................................................................................ | ||
| 229 | +................................................................................ | ||
| 230 | +................................................................................ | ||
| 231 | +................................................................................ | ||
| 232 | +................................................................................ | ||
| 233 | +................................................................................ | ||
| 234 | +................................................................................ | ||
| 235 | +................................................................................ | ||
| 236 | +................................................................................ | ||
| 237 | +................................................................................ | ||
| 238 | +................................................................................ | ||
| 239 | +................................................................................ | ||
| 240 | +................................................................................ | ||
| 241 | +................................................................................ | ||
| 242 | +................................................................................ | ||
| 243 | +................................................................................ | ||
| 244 | +................................................................................ | ||
| 245 | +................................................................................ | ||
| 246 | +................................................................................ | ||
| 247 | +................................................................................ | ||
| 248 | +................................................................................ | ||
| 249 | +................................................................................ | ||
| 250 | +................................................................................ | ||
| 251 | +................................................................................ | ||
| 252 | +................................................................................ | ||
| 253 | +................................................................................ | ||
| 254 | +................................................................................ | ||
| 255 | -- | ||
| 256 | 2.17.1 | ||
| 257 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch new file mode 100644 index 000000000..6f571a12d --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 3 | Date: Sun, 11 Apr 2021 19:48:13 +0100 | ||
| 4 | Subject: [PATCH 1/4] tests: respect the idententaion used in meson | ||
| 5 | |||
| 6 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] | ||
| 7 | |||
| 8 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 9 | --- | ||
| 10 | tests/check/meson.build | 10 +++++----- | ||
| 11 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
| 14 | index a617cf159..b2636714b 100644 | ||
| 15 | --- a/tests/check/meson.build | ||
| 16 | +++ b/tests/check/meson.build | ||
| 17 | @@ -146,11 +146,11 @@ foreach t : core_tests | ||
| 18 | |||
| 19 | if not skip_test | ||
| 20 | exe = executable(test_name, fname, | ||
| 21 | - c_args : gst_c_args + test_defines, | ||
| 22 | - cpp_args : gst_c_args + test_defines, | ||
| 23 | - include_directories : [configinc], | ||
| 24 | - link_with : link_with_libs, | ||
| 25 | - dependencies : test_deps + glib_deps + gst_deps, | ||
| 26 | + c_args : gst_c_args + test_defines, | ||
| 27 | + cpp_args : gst_c_args + test_defines, | ||
| 28 | + include_directories : [configinc], | ||
| 29 | + link_with : link_with_libs, | ||
| 30 | + dependencies : test_deps + glib_deps + gst_deps, | ||
| 31 | ) | ||
| 32 | |||
| 33 | env = environment() | ||
| 34 | -- | ||
| 35 | 2.31.1 | ||
| 36 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch new file mode 100644 index 000000000..b77fb5797 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 3 | Date: Sun, 11 Apr 2021 19:48:13 +0100 | ||
| 4 | Subject: [PATCH 2/4] tests: add support for install the tests | ||
| 5 | |||
| 6 | This will provide to run the tests using the gnome-desktop-testing [1] | ||
| 7 | |||
| 8 | [1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] | ||
| 11 | |||
| 12 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 13 | --- | ||
| 14 | meson.build | 5 +++++ | ||
| 15 | meson_options.txt | 1 + | ||
| 16 | template.test.in | 3 +++ | ||
| 17 | tests/check/meson.build | 22 +++++++++++++++++++++- | ||
| 18 | 4 files changed, 30 insertions(+), 1 deletion(-) | ||
| 19 | create mode 100644 template.test.in | ||
| 20 | |||
| 21 | diff --git a/meson.build b/meson.build | ||
| 22 | index c4e8774f5..1abf4eb26 100644 | ||
| 23 | --- a/meson.build | ||
| 24 | +++ b/meson.build | ||
| 25 | @@ -562,6 +562,11 @@ if bashcomp_dep.found() | ||
| 26 | endif | ||
| 27 | endif | ||
| 28 | |||
| 29 | +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_enabled = get_option('installed-tests') | ||
| 32 | +installed_tests_template = files('template.test.in') | ||
| 33 | + | ||
| 34 | plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') | ||
| 35 | |||
| 36 | pkgconfig = import('pkgconfig') | ||
| 37 | diff --git a/meson_options.txt b/meson_options.txt | ||
| 38 | index c8cee3762..b5da40eaa 100644 | ||
| 39 | --- a/meson_options.txt | ||
| 40 | +++ b/meson_options.txt | ||
| 41 | @@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso | ||
| 42 | option('memory-alignment', type: 'combo', | ||
| 43 | choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], | ||
| 44 | value: 'malloc') | ||
| 45 | +option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests') | ||
| 46 | |||
| 47 | # Feature options | ||
| 48 | option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') | ||
| 49 | diff --git a/template.test.in b/template.test.in | ||
| 50 | new file mode 100644 | ||
| 51 | index 000000000..f701627f8 | ||
| 52 | --- /dev/null | ||
| 53 | +++ b/template.test.in | ||
| 54 | @@ -0,0 +1,3 @@ | ||
| 55 | +[Test] | ||
| 56 | +Type=session | ||
| 57 | +Exec=@installed_tests_dir@/@program@ | ||
| 58 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
| 59 | index b2636714b..a697a7b06 100644 | ||
| 60 | --- a/tests/check/meson.build | ||
| 61 | +++ b/tests/check/meson.build | ||
| 62 | @@ -124,10 +124,16 @@ test_defines = [ | ||
| 63 | '-UG_DISABLE_ASSERT', | ||
| 64 | '-UG_DISABLE_CAST_CHECKS', | ||
| 65 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', | ||
| 66 | - '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', | ||
| 67 | '-DGST_DISABLE_DEPRECATED', | ||
| 68 | ] | ||
| 69 | |||
| 70 | +testfile = meson.current_source_dir() + '/meson.build' | ||
| 71 | +if installed_tests_enabled | ||
| 72 | + install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile') | ||
| 73 | + testfile = installed_tests_metadir + '/testfile' | ||
| 74 | +endif | ||
| 75 | +test_defines += '-DTESTFILE="@0@"'.format(testfile) | ||
| 76 | + | ||
| 77 | # sanity checking | ||
| 78 | if get_option('check').disabled() | ||
| 79 | if get_option('tests').enabled() | ||
| 80 | @@ -151,6 +157,8 @@ foreach t : core_tests | ||
| 81 | include_directories : [configinc], | ||
| 82 | link_with : link_with_libs, | ||
| 83 | dependencies : test_deps + glib_deps + gst_deps, | ||
| 84 | + install_dir: installed_tests_execdir, | ||
| 85 | + install: installed_tests_enabled, | ||
| 86 | ) | ||
| 87 | |||
| 88 | env = environment() | ||
| 89 | @@ -162,6 +170,18 @@ foreach t : core_tests | ||
| 90 | env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') | ||
| 91 | env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') | ||
| 92 | |||
| 93 | + if installed_tests_enabled | ||
| 94 | + test_conf = configuration_data() | ||
| 95 | + test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) | ||
| 96 | + test_conf.set('program', test_name) | ||
| 97 | + configure_file( | ||
| 98 | + input: installed_tests_template, | ||
| 99 | + output: test_name + '.test', | ||
| 100 | + install_dir: installed_tests_metadir, | ||
| 101 | + configuration: test_conf | ||
| 102 | + ) | ||
| 103 | + endif | ||
| 104 | + | ||
| 105 | test(test_name, exe, env: env, timeout : 3 * 60) | ||
| 106 | endif | ||
| 107 | endforeach | ||
| 108 | -- | ||
| 109 | 2.31.1 | ||
| 110 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch new file mode 100644 index 000000000..46813cec3 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 3 | Date: Sat, 24 Apr 2021 10:34:47 +0100 | ||
| 4 | Subject: [PATCH 3/4] tests: use a dictionaries for environment | ||
| 5 | |||
| 6 | meson environment() can't be passed to configure_file and it is needed for installed_tests, | ||
| 7 | use a dictionary as this is simplest solution to install the environment. | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] | ||
| 10 | |||
| 11 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 12 | --- | ||
| 13 | tests/check/meson.build | 19 +++++++++++-------- | ||
| 14 | 1 file changed, 11 insertions(+), 8 deletions(-) | ||
| 15 | |||
| 16 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
| 17 | index a697a7b06..f64524904 100644 | ||
| 18 | --- a/tests/check/meson.build | ||
| 19 | +++ b/tests/check/meson.build | ||
| 20 | @@ -161,14 +161,17 @@ foreach t : core_tests | ||
| 21 | install: installed_tests_enabled, | ||
| 22 | ) | ||
| 23 | |||
| 24 | - env = environment() | ||
| 25 | - env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) | ||
| 26 | - env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') | ||
| 27 | - env.set('GST_STATE_IGNORE_ELEMENTS', '') | ||
| 28 | - env.set('CK_DEFAULT_TIMEOUT', '20') | ||
| 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') | ||
| 31 | - env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') | ||
| 32 | + # environment() can't be passed to configure_file and it is needed for installed_tests | ||
| 33 | + # use a dictionary as this is simplest solution to install the environment | ||
| 34 | + env = { | ||
| 35 | + 'GST_PLUGIN_PATH_1_0': meson.build_root(), | ||
| 36 | + 'GST_PLUGIN_SYSTEM_PATH_1_0': '', | ||
| 37 | + 'GST_STATE_IGNORE_ELEMENTS': '', | ||
| 38 | + 'CK_DEFAULT_TIMEOUT': '20', | ||
| 39 | + 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name), | ||
| 40 | + 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner', | ||
| 41 | + 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer', | ||
| 42 | + } | ||
| 43 | |||
| 44 | if installed_tests_enabled | ||
| 45 | test_conf = configuration_data() | ||
| 46 | -- | ||
| 47 | 2.31.1 | ||
| 48 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch new file mode 100644 index 000000000..eabe7bcbe --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | From 57d2965e979f886e03eecd7e351bf01812053971 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jose Quaresma <quaresma.jose@gmail.com> | ||
| 3 | Date: Sun, 2 May 2021 01:58:01 +0100 | ||
| 4 | Subject: [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 | |||
| 10 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] | ||
| 11 | |||
| 12 | Signed-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 | |||
| 18 | diff --git a/template.test.in b/template.test.in | ||
| 19 | index 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@' | ||
| 27 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
| 28 | index 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 | -- | ||
| 57 | 2.31.1 | ||
| 58 | |||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch b/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch deleted file mode 100644 index 7ca3d5ad4..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch +++ /dev/null | |||
| @@ -1,37 +0,0 @@ | |||
| 1 | Currently gstreamer configuration depends on whether setcap is found on the host | ||
| 2 | system. Turn this into a configure option to make builds deterinistic. | ||
| 3 | |||
| 4 | RP 2020/2/19 | ||
| 5 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
| 6 | Upstream-Status: Pending | ||
| 7 | |||
| 8 | Index: gstreamer-1.16.1/libs/gst/helpers/meson.build | ||
| 9 | =================================================================== | ||
| 10 | --- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build | ||
| 11 | +++ gstreamer-1.16.1/libs/gst/helpers/meson.build | ||
| 12 | @@ -73,7 +73,12 @@ if have_ptp | ||
| 13 | endif | ||
| 14 | endif | ||
| 15 | |||
| 16 | - setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) | ||
| 17 | + setcap_feature = get_option('setcap') | ||
| 18 | + if setcap_feature.disabled() | ||
| 19 | + setcap = find_program('dontexist', required : false) | ||
| 20 | + else | ||
| 21 | + setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) | ||
| 22 | + endif | ||
| 23 | |||
| 24 | # user/group to change to in gst-ptp-helper | ||
| 25 | ptp_helper_setuid_user = get_option('ptp-helper-setuid-user') | ||
| 26 | Index: gstreamer-1.16.1/meson_options.txt | ||
| 27 | =================================================================== | ||
| 28 | --- gstreamer-1.16.1.orig/meson_options.txt | ||
| 29 | +++ gstreamer-1.16.1/meson_options.txt | ||
| 30 | @@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va | ||
| 31 | option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') | ||
| 32 | option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') | ||
| 33 | option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files') | ||
| 34 | +option('setcap', type : 'feature', value : 'auto', description : 'Use setcap') | ||
| 35 | |||
| 36 | # Common feature options | ||
| 37 | option('examples', type : 'feature', value : 'auto', yield : true) | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest new file mode 100755 index 000000000..0cfa955f0 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | #!/usr/bin/env sh | ||
| 2 | gnome-desktop-testing-runner gstreamer | ||
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb index 8d347cb58..13d1682a7 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0_1.18.0.imx.bb | |||
| @@ -6,28 +6,29 @@ BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" | |||
| 6 | SECTION = "multimedia" | 6 | SECTION = "multimedia" |
| 7 | LICENSE = "LGPLv2+" | 7 | LICENSE = "LGPLv2+" |
| 8 | 8 | ||
| 9 | DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" | 9 | DEPENDS = "glib-2.0 glib-2.0-native libxml2 bison-native flex-native" |
| 10 | 10 | ||
| 11 | inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc | 11 | inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection ptest-gnome |
| 12 | 12 | ||
| 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ | 13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ |
| 14 | file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" | 14 | file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" |
| 15 | 15 | ||
| 16 | S = "${WORKDIR}/git" | ||
| 17 | |||
| 16 | # Use i.MX fork of GST for customizations | 18 | # Use i.MX fork of GST for customizations |
| 17 | GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" | 19 | GST1.0_SRC ?= "gitsm://source.codeaurora.org/external/imx/gstreamer.git;protocol=https" |
| 18 | SRCBRANCH = "MM_04.05.06_2008_L5.4.47" | 20 | SRCBRANCH = "MM_04.06.01_2105_L5.10.y" |
| 19 | 21 | SRC_URI = "${GST1.0_SRC};branch=${SRCBRANCH} \ | |
| 20 | SRC_URI = " \ | 22 | file://run-ptest \ |
| 21 | ${GST1.0_SRC};branch=${SRCBRANCH} \ | 23 | file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ |
| 22 | file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ | 24 | file://0002-Remove-unused-valgrind-detection.patch \ |
| 23 | file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ | 25 | file://0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch \ |
| 24 | file://0003-meson-Add-valgrind-feature.patch \ | 26 | file://0004-tests-respect-the-idententaion-used-in-meson.patch \ |
| 25 | file://0004-meson-Add-option-for-installed-tests.patch \ | 27 | file://0005-tests-add-support-for-install-the-tests.patch \ |
| 26 | file://capfix.patch \ | 28 | file://0006-tests-use-a-dictionaries-for-environment.patch \ |
| 27 | " | 29 | file://0007-tests-install-the-environment-for-installed_tests.patch \ |
| 28 | SRCREV = "8514bc61ccab208a65e387eab9347276a8e770e7" | 30 | " |
| 29 | 31 | SRCREV = "2f20fd10eaf8629b3e8c134424c38412c4d3bd86" | |
| 30 | S = "${WORKDIR}/git" | ||
| 31 | 32 | ||
| 32 | DEFAULT_PREFERENCE = "-1" | 33 | DEFAULT_PREFERENCE = "-1" |
| 33 | 34 | ||
| @@ -38,14 +39,14 @@ PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ | |||
| 38 | 39 | ||
| 39 | PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" | 40 | PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" |
| 40 | PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" | 41 | PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" |
| 42 | PACKAGECONFIG[coretracers] = "-Dcoretracers=enabled,-Dcoretracers=disabled" | ||
| 41 | PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" | 43 | PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" |
| 42 | PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" | 44 | PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" |
| 43 | PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind," | ||
| 44 | PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" | 45 | PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" |
| 45 | PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" | 46 | PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" |
| 46 | PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" | 47 | PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" |
| 47 | PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" | 48 | PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" |
| 48 | PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native" | 49 | PACKAGECONFIG[setcap] = "-Dptp-helper-permissions=capabilities,,libcap libcap-native" |
| 49 | 50 | ||
| 50 | # TODO: put this in a gettext.bbclass patch | 51 | # TODO: put this in a gettext.bbclass patch |
| 51 | def gettext_oemeson(d): | 52 | def gettext_oemeson(d): |
| @@ -57,15 +58,12 @@ def gettext_oemeson(d): | |||
| 57 | return '-Dnls=enabled' | 58 | return '-Dnls=enabled' |
| 58 | 59 | ||
| 59 | EXTRA_OEMESON += " \ | 60 | EXTRA_OEMESON += " \ |
| 61 | -Ddoc=disabled \ | ||
| 60 | -Dexamples=disabled \ | 62 | -Dexamples=disabled \ |
| 61 | -Ddbghelp=disabled \ | 63 | -Ddbghelp=disabled \ |
| 62 | ${@gettext_oemeson(d)} \ | 64 | ${@gettext_oemeson(d)} \ |
| 63 | " | 65 | " |
| 64 | 66 | ||
| 65 | GTKDOC_MESON_OPTION = "gtk_doc" | ||
| 66 | GTKDOC_MESON_ENABLE_FLAG = "enabled" | ||
| 67 | GTKDOC_MESON_DISABLE_FLAG = "disabled" | ||
| 68 | |||
| 69 | GIR_MESON_ENABLE_FLAG = "enabled" | 67 | GIR_MESON_ENABLE_FLAG = "enabled" |
| 70 | GIR_MESON_DISABLE_FLAG = "disabled" | 68 | GIR_MESON_DISABLE_FLAG = "disabled" |
| 71 | 69 | ||
| @@ -75,10 +73,10 @@ PACKAGES += "${PN}-bash-completion" | |||
| 75 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" | 73 | FILES:${PN} += "${libdir}/gstreamer-1.0/*.so" |
| 76 | FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" | 74 | FILES:${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" |
| 77 | FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" | 75 | FILES:${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" |
| 78 | FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb ${datadir}/glib-2.0/gdb" | 76 | FILES:${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb" |
| 79 | 77 | ||
| 80 | CVE_PRODUCT = "gstreamer" | 78 | CVE_PRODUCT = "gstreamer" |
| 81 | 79 | ||
| 82 | require recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc | 80 | PTEST_BUILD_HOST_FILES = "" |
| 83 | 81 | ||
| 84 | COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" | 82 | COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" |
