From 178bcddd87bbb379d0d2abc3349d3c1417c54d49 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 31 Aug 2022 13:28:24 -0500 Subject: gstreamer1.0*: Upgrade 1.18.5.imx -> 1.20.0.imx Includes: - gstreamer1.0 - gstreamer1.0-plugins-base - gstreamer1.0-plugins-good - gstreamer1.0-plugins-bad Drops downgraded recipe copies for 1.18.5: - gstreamer1.0-libav - gstreamer1.0-plugins-ugly - gstreamer1.0-rtsp-server Signed-off-by: Tom Hochstein --- ...inloader.c-when-env-var-is-set-do-not-fal.patch | 69 ------------- ...ts-respect-the-idententaion-used-in-meson.patch | 36 +++++++ .../0002-Remove-unused-valgrind-detection.patch | 110 --------------------- ...2-tests-add-support-for-install-the-tests.patch | 109 ++++++++++++++++++++ ...Don-t-use-too-strict-timeout-for-validati.patch | 32 ------ ...-tests-use-a-dictionaries-for-environment.patch | 50 ++++++++++ ...-helper-script-to-run-the-installed_tests.patch | 74 ++++++++++++++ ...ts-respect-the-idententaion-used-in-meson.patch | 36 ------- ...5-tests-add-support-for-install-the-tests.patch | 110 --------------------- ...e-gstbin-test_watch_for_state_change-test.patch | 107 ++++++++++++++++++++ ...-tests-use-a-dictionaries-for-environment.patch | 48 --------- ...stall-the-environment-for-installed_tests.patch | 58 ----------- 12 files changed, 376 insertions(+), 463 deletions(-) delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch delete mode 100644 recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch (limited to 'recipes-multimedia/gstreamer/gstreamer1.0') 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 deleted file mode 100644 index 23ebd5c6..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ /dev/null @@ -1,69 +0,0 @@ -From fd8f49dba8c09d47425da80f5faab3bfa4a7c962 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma -Date: Sat, 10 Oct 2020 19:09:03 +0000 -Subject: [PATCH 1/3] gstpluginloader: when env var is set do not fall through - to system plugin scanner - -If we set a custom GST_PLUGIN_SCANNER env var, then we probably want to use that and only that. - -Falling through to the one installed on the system is problamatic in cross-compilation -environemnts, regardless of whether one pointed to by the env var succeeded or failed. - -taken from: -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 - -Part-of: - -Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/9f958058697e6fbf5bde325228034572331d1a3a] - -Signed-off-by: Jose Quaresma ---- - gst/gstpluginloader.c | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c -index d1e404d98..c626bf263 100644 ---- a/gst/gstpluginloader.c -+++ b/gst/gstpluginloader.c -@@ -464,20 +464,19 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - if (loader->child_running) - return TRUE; - -- /* Find the gst-plugin-scanner: first try the env-var if it is set, -- * otherwise use the installed version */ -+ /* Find the gst-plugin-scanner */ - env = g_getenv ("GST_PLUGIN_SCANNER_1_0"); - if (env == NULL) - env = g_getenv ("GST_PLUGIN_SCANNER"); - - if (env != NULL && *env != '\0') { -+ /* use the env-var if it is set */ - GST_LOG ("Trying GST_PLUGIN_SCANNER env var: %s", env); - helper_bin = g_strdup (env); - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -- } -- -- if (!res) { -+ } else { -+ /* use the installed version */ - GST_LOG ("Trying installed plugin scanner"); - - #ifdef G_OS_WIN32 -@@ -497,10 +496,10 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - #endif - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -+ } - -- if (!res) { -- GST_INFO ("No gst-plugin-scanner available, or not working"); -- } -+ if (!res) { -+ GST_INFO ("No gst-plugin-scanner available, or not working"); - } - - return loader->child_running; --- -2.29.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch new file mode 100644 index 00000000..312c04fb --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch @@ -0,0 +1,36 @@ +From 1eb77a4ea5a3967c688d8f1192f99c605badc7e2 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma +Date: Sun, 11 Apr 2021 19:48:13 +0100 +Subject: [PATCH 1/4] tests: respect the idententaion used in meson + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma +--- + subprojects/gstreamer/tests/check/meson.build | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build +index 9c4228b6e4..506606684d 100644 +--- a/subprojects/gstreamer/tests/check/meson.build ++++ b/subprojects/gstreamer/tests/check/meson.build +@@ -146,11 +146,11 @@ foreach t : core_tests + + if not skip_test + exe = executable(test_name, fname, +- c_args : gst_c_args + test_defines, +- cpp_args : gst_c_args + test_defines, +- include_directories : [configinc], +- link_with : link_with_libs, +- dependencies : test_deps + glib_deps + gst_deps, ++ c_args : gst_c_args + test_defines, ++ cpp_args : gst_c_args + test_defines, ++ include_directories : [configinc], ++ link_with : link_with_libs, ++ dependencies : test_deps + glib_deps + gst_deps, + ) + + env = environment() +-- +2.33.1 + 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 deleted file mode 100644 index 5805e8b6..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch +++ /dev/null @@ -1,110 +0,0 @@ -From d7f05d09c55d35bbe4e0f856759519ef183d9a56 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= -Date: Fri, 14 Aug 2020 16:38:26 +0100 -Subject: [PATCH] Remove unused valgrind detection - -Having this just to log a debug message in case we're -running inside valgrind doesn't seem very useful, and -the code that used to use this no longer exists it seems. - -Part-of: - -Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245] - -Signed-off-by: Jose Quaresma - ---- - gst/gst_private.h | 2 -- - gst/gstinfo.c | 39 --------------------------------------- - meson.build | 1 - - 3 files changed, 42 deletions(-) - -diff --git a/gst/gst_private.h b/gst/gst_private.h -index eefd044d9..8252ede51 100644 ---- a/gst/gst_private.h -+++ b/gst/gst_private.h -@@ -116,8 +116,6 @@ G_GNUC_INTERNAL gboolean _priv_plugin_deps_env_vars_changed (GstPlugin * plugin - - G_GNUC_INTERNAL gboolean _priv_plugin_deps_files_changed (GstPlugin * plugin); - --G_GNUC_INTERNAL gboolean _priv_gst_in_valgrind (void); -- - /* init functions called from gst_init(). */ - G_GNUC_INTERNAL void _priv_gst_quarks_initialize (void); - G_GNUC_INTERNAL void _priv_gst_mini_object_initialize (void); -diff --git a/gst/gstinfo.c b/gst/gstinfo.c -index eea1a219d..d3035d6db 100644 ---- a/gst/gstinfo.c -+++ b/gst/gstinfo.c -@@ -305,36 +305,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; - static gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; - static gint G_GNUC_MAY_ALIAS __use_color = GST_DEBUG_COLOR_MODE_ON; - --/* FIXME: export this? */ --gboolean --_priv_gst_in_valgrind (void) --{ -- static enum -- { -- GST_VG_UNCHECKED, -- GST_VG_NO_VALGRIND, -- GST_VG_INSIDE -- } -- in_valgrind = GST_VG_UNCHECKED; -- -- if (in_valgrind == GST_VG_UNCHECKED) { --#ifdef HAVE_VALGRIND_VALGRIND_H -- if (RUNNING_ON_VALGRIND) { -- GST_CAT_INFO (GST_CAT_GST_INIT, "we're running inside valgrind"); -- in_valgrind = GST_VG_INSIDE; -- } else { -- GST_CAT_LOG (GST_CAT_GST_INIT, "not doing extra valgrind stuff"); -- in_valgrind = GST_VG_NO_VALGRIND; -- } --#else -- in_valgrind = GST_VG_NO_VALGRIND; --#endif -- g_assert (in_valgrind == GST_VG_NO_VALGRIND || -- in_valgrind == GST_VG_INSIDE); -- } -- return (in_valgrind == GST_VG_INSIDE); --} -- - static gchar * - _replace_pattern_in_gst_debug_file_name (gchar * name, const char *token, - guint val) -@@ -463,9 +433,6 @@ _priv_gst_debug_init (void) - _priv_GST_CAT_PROTECTION = - _gst_debug_category_new ("GST_PROTECTION", 0, "protection"); - -- /* print out the valgrind message if we're in valgrind */ -- _priv_gst_in_valgrind (); -- - env = g_getenv ("GST_DEBUG_OPTIONS"); - if (env != NULL) { - if (strstr (env, "full_tags") || strstr (env, "full-tags")) -@@ -2505,12 +2472,6 @@ gst_debug_construct_win_color (guint colorinfo) - return 0; - } - --gboolean --_priv_gst_in_valgrind (void) --{ -- return FALSE; --} -- - void - _gst_debug_dump_mem (GstDebugCategory * cat, const gchar * file, - const gchar * func, gint line, GObject * obj, const gchar * msg, -diff --git a/meson.build b/meson.build -index 82a17282b..42ae61790 100644 ---- a/meson.build -+++ b/meson.build -@@ -200,7 +200,6 @@ check_headers = [ - 'sys/wait.h', - 'ucontext.h', - 'unistd.h', -- 'valgrind/valgrind.h', - 'sys/resource.h', - 'sys/uio.h', - ] diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch new file mode 100644 index 00000000..d18c19c3 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch @@ -0,0 +1,109 @@ +From 62f5bb7bfc2498219df7280e73480d8ed2378ce5 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma +Date: Sun, 11 Apr 2021 19:48:13 +0100 +Subject: [PATCH 2/4] tests: add support for install the tests + +This will provide to run the tests using the gnome-desktop-testing [1] + +[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma +--- + subprojects/gstreamer/meson.build | 4 ++++ + subprojects/gstreamer/meson_options.txt | 1 + + subprojects/gstreamer/tests/check/meson.build | 22 ++++++++++++++++++- + .../gstreamer/tests/check/template.test.in | 3 +++ + 4 files changed, 29 insertions(+), 1 deletion(-) + create mode 100644 subprojects/gstreamer/tests/check/template.test.in + +diff --git a/subprojects/gstreamer/meson.build b/subprojects/gstreamer/meson.build +index d20fe0040f..b595d8f990 100644 +--- a/subprojects/gstreamer/meson.build ++++ b/subprojects/gstreamer/meson.build +@@ -562,6 +562,10 @@ if bashcomp_dep.found() + endif + endif + ++installed_tests_enabled = get_option('installed_tests') ++installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name()) ++installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name()) ++ + plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') + + pkgconfig = import('pkgconfig') +diff --git a/subprojects/gstreamer/meson_options.txt b/subprojects/gstreamer/meson_options.txt +index 7363bdb7a1..a34ba37dad 100644 +--- a/subprojects/gstreamer/meson_options.txt ++++ b/subprojects/gstreamer/meson_options.txt +@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso + option('memory-alignment', type: 'combo', + choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], + value: 'malloc') ++option('installed_tests', type : 'boolean', value : false, description : 'Enable installed tests') + + # Feature options + option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') +diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build +index 506606684d..00a138a568 100644 +--- a/subprojects/gstreamer/tests/check/meson.build ++++ b/subprojects/gstreamer/tests/check/meson.build +@@ -124,10 +124,16 @@ test_defines = [ + '-UG_DISABLE_ASSERT', + '-UG_DISABLE_CAST_CHECKS', + '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', +- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', + '-DGST_DISABLE_DEPRECATED', + ] + ++testfile = meson.current_source_dir() + '/meson.build' ++if installed_tests_enabled ++ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile') ++ testfile = installed_tests_metadir + '/testfile' ++endif ++test_defines += '-DTESTFILE="@0@"'.format(testfile) ++ + # sanity checking + if get_option('check').disabled() + if get_option('tests').enabled() +@@ -151,6 +157,8 @@ foreach t : core_tests + include_directories : [configinc], + link_with : link_with_libs, + dependencies : test_deps + glib_deps + gst_deps, ++ install_dir: installed_tests_execdir, ++ install: installed_tests_enabled, + ) + + env = environment() +@@ -162,6 +170,18 @@ foreach t : core_tests + env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') + env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') + ++ if installed_tests_enabled ++ test_conf = configuration_data() ++ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) ++ test_conf.set('program', test_name) ++ configure_file( ++ input: 'template.test.in', ++ output: test_name + '.test', ++ install_dir: installed_tests_metadir, ++ configuration: test_conf ++ ) ++ endif ++ + test(test_name, exe, env: env, timeout : 3 * 60) + endif + endforeach +diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in +new file mode 100644 +index 0000000000..f701627f87 +--- /dev/null ++++ b/subprojects/gstreamer/tests/check/template.test.in +@@ -0,0 +1,3 @@ ++[Test] ++Type=session ++Exec=@installed_tests_dir@/@program@ +-- +2.33.1 + 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 deleted file mode 100644 index e0e64e2c..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-seek-Don-t-use-too-strict-timeout-for-validati.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 1db36347d05d88835519368442e9aa89c64091ad Mon Sep 17 00:00:00 2001 -From: Seungha Yang -Date: Tue, 15 Sep 2020 00:54:58 +0900 -Subject: [PATCH] tests: seek: Don't use too strict timeout for validation - -Expected segment-done message might not be seen within expected -time if system is not powerful enough. - -Part-of: - -Upstream-Status: Backport [https://cgit.freedesktop.org/gstreamer/gstreamer/commit?id=f44312ae5d831438fcf8041162079c65321c588c] -Signed-off-by: Anuj Mittal ---- - tests/check/pipelines/seek.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/check/pipelines/seek.c b/tests/check/pipelines/seek.c -index 28bb8846d..5f7447bc5 100644 ---- a/tests/check/pipelines/seek.c -+++ b/tests/check/pipelines/seek.c -@@ -521,7 +521,7 @@ GST_START_TEST (test_loopback_2) - - GST_INFO ("wait for segment done message"); - -- msg = gst_bus_timed_pop_filtered (bus, (GstClockTime) 2 * GST_SECOND, -+ msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, - GST_MESSAGE_SEGMENT_DONE | GST_MESSAGE_ERROR); - fail_unless (msg, "no message within the timed window"); - fail_unless_equals_string (GST_MESSAGE_TYPE_NAME (msg), "segment-done"); --- -2.29.2 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch new file mode 100644 index 00000000..10a6dcc6 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch @@ -0,0 +1,50 @@ +From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma +Date: Sat, 24 Apr 2021 10:34:47 +0100 +Subject: [PATCH 3/4] tests: use a dictionaries for environment + +meson environment() can't be passed to configure_file and it is needed for installed_tests, +use a dictionary as this is simplest solution to install the environment. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma +--- + subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build +index 00a138a568..48ec2532f8 100644 +--- a/subprojects/gstreamer/tests/check/meson.build ++++ b/subprojects/gstreamer/tests/check/meson.build +@@ -161,14 +161,19 @@ foreach t : core_tests + install: installed_tests_enabled, + ) + +- env = environment() +- env.set('GST_PLUGIN_PATH_1_0', meson.project_build_root()) +- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') +- env.set('GST_STATE_IGNORE_ELEMENTS', '') +- env.set('CK_DEFAULT_TIMEOUT', '20') +- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) +- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') +- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') ++ # meson environment object can't be passed to configure_file and ++ # installed tests uses configure_file to install the environment. ++ # use a dictionary as this is the simplest solution ++ # to install the environment. ++ env = { ++ 'GST_PLUGIN_PATH_1_0': meson.project_build_root(), ++ 'GST_PLUGIN_SYSTEM_PATH_1_0': '', ++ 'GST_STATE_IGNORE_ELEMENTS': '', ++ 'CK_DEFAULT_TIMEOUT': '20', ++ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name), ++ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner', ++ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer', ++ } + + if installed_tests_enabled + test_conf = configuration_data() +-- +2.33.1 + diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch new file mode 100644 index 00000000..efa004f8 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch @@ -0,0 +1,74 @@ +From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma +Date: Sun, 2 May 2021 01:58:01 +0100 +Subject: [PATCH 4/4] tests: add helper script to run the installed_tests + +- this is a bash script that will run the installed_tests +with some of the environment variables used in the meson +testing framework. + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma +--- + subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++ + .../gstreamer/tests/check/template.sh.in | 9 +++++++++ + .../gstreamer/tests/check/template.test.in | 2 +- + 3 files changed, 27 insertions(+), 1 deletion(-) + create mode 100755 subprojects/gstreamer/tests/check/template.sh.in + +diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build +index 48ec2532f8..7dc4990d4e 100644 +--- a/subprojects/gstreamer/tests/check/meson.build ++++ b/subprojects/gstreamer/tests/check/meson.build +@@ -185,6 +185,23 @@ foreach t : core_tests + install_dir: installed_tests_metadir, + configuration: test_conf + ) ++ ++ # All the tests will be deployed on the target machine and ++ # we use the home folder ~ for the registry which will then expand at runtime. ++ # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly ++ # is mounted using tmpfs and if the machine crash from some reason we can lost the registry ++ # that is useful for debug propose of the tests itself. ++ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} ++ ++ # Set the full path for the test it self. ++ env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)} ++ ++ configure_file( ++ input : 'template.sh.in', ++ output: test_name + '.sh', ++ install_dir: installed_tests_execdir, ++ configuration : env, ++ ) + endif + + test(test_name, exe, env: env, timeout : 3 * 60) +diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in +new file mode 100755 +index 0000000000..cf7d31b0ea +--- /dev/null ++++ b/subprojects/gstreamer/tests/check/template.sh.in +@@ -0,0 +1,9 @@ ++#!/bin/sh ++ ++set -ax ++ ++CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@" ++GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" ++GST_REGISTRY=@GST_REGISTRY@ ++GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" ++exec @TEST@ +diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in +index f701627f87..b74ef6ad73 100644 +--- a/subprojects/gstreamer/tests/check/template.test.in ++++ b/subprojects/gstreamer/tests/check/template.test.in +@@ -1,3 +1,3 @@ + [Test] + Type=session +-Exec=@installed_tests_dir@/@program@ ++Exec=@installed_tests_dir@/@program@.sh +-- +2.33.1 + 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 deleted file mode 100644 index 6f571a12..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-respect-the-idententaion-used-in-meson.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 122e5ac3dd16a461b6ae595605490c8f5d1c3a9d Mon Sep 17 00:00:00 2001 -From: Jose Quaresma -Date: Sun, 11 Apr 2021 19:48:13 +0100 -Subject: [PATCH 1/4] tests: respect the idententaion used in meson - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] - -Signed-off-by: Jose Quaresma ---- - tests/check/meson.build | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/tests/check/meson.build b/tests/check/meson.build -index a617cf159..b2636714b 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -146,11 +146,11 @@ foreach t : core_tests - - if not skip_test - exe = executable(test_name, fname, -- c_args : gst_c_args + test_defines, -- cpp_args : gst_c_args + test_defines, -- include_directories : [configinc], -- link_with : link_with_libs, -- dependencies : test_deps + glib_deps + gst_deps, -+ c_args : gst_c_args + test_defines, -+ cpp_args : gst_c_args + test_defines, -+ include_directories : [configinc], -+ link_with : link_with_libs, -+ dependencies : test_deps + glib_deps + gst_deps, - ) - - env = environment() --- -2.31.1 - 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 deleted file mode 100644 index b77fb579..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-add-support-for-install-the-tests.patch +++ /dev/null @@ -1,110 +0,0 @@ -From c9e93c7a3e4d2773abef4f5e1464af24f36700b3 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma -Date: Sun, 11 Apr 2021 19:48:13 +0100 -Subject: [PATCH 2/4] tests: add support for install the tests - -This will provide to run the tests using the gnome-desktop-testing [1] - -[1] https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] - -Signed-off-by: Jose Quaresma ---- - meson.build | 5 +++++ - meson_options.txt | 1 + - template.test.in | 3 +++ - tests/check/meson.build | 22 +++++++++++++++++++++- - 4 files changed, 30 insertions(+), 1 deletion(-) - create mode 100644 template.test.in - -diff --git a/meson.build b/meson.build -index c4e8774f5..1abf4eb26 100644 ---- a/meson.build -+++ b/meson.build -@@ -562,6 +562,11 @@ if bashcomp_dep.found() - endif - endif - -+installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name()) -+installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name()) -+installed_tests_enabled = get_option('installed-tests') -+installed_tests_template = files('template.test.in') -+ - plugins_install_dir = join_paths(get_option('libdir'), 'gstreamer-1.0') - - pkgconfig = import('pkgconfig') -diff --git a/meson_options.txt b/meson_options.txt -index c8cee3762..b5da40eaa 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -15,6 +15,7 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso - option('memory-alignment', type: 'combo', - choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], - value: 'malloc') -+option('installed-tests', type : 'boolean', value : false, description : 'Enable installed tests') - - # Feature options - option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') -diff --git a/template.test.in b/template.test.in -new file mode 100644 -index 000000000..f701627f8 ---- /dev/null -+++ b/template.test.in -@@ -0,0 +1,3 @@ -+[Test] -+Type=session -+Exec=@installed_tests_dir@/@program@ -diff --git a/tests/check/meson.build b/tests/check/meson.build -index b2636714b..a697a7b06 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -124,10 +124,16 @@ test_defines = [ - '-UG_DISABLE_ASSERT', - '-UG_DISABLE_CAST_CHECKS', - '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', -- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', - '-DGST_DISABLE_DEPRECATED', - ] - -+testfile = meson.current_source_dir() + '/meson.build' -+if installed_tests_enabled -+ install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile') -+ testfile = installed_tests_metadir + '/testfile' -+endif -+test_defines += '-DTESTFILE="@0@"'.format(testfile) -+ - # sanity checking - if get_option('check').disabled() - if get_option('tests').enabled() -@@ -151,6 +157,8 @@ foreach t : core_tests - include_directories : [configinc], - link_with : link_with_libs, - dependencies : test_deps + glib_deps + gst_deps, -+ install_dir: installed_tests_execdir, -+ install: installed_tests_enabled, - ) - - env = environment() -@@ -162,6 +170,18 @@ foreach t : core_tests - env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') - env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') - -+ if installed_tests_enabled -+ test_conf = configuration_data() -+ test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) -+ test_conf.set('program', test_name) -+ configure_file( -+ input: installed_tests_template, -+ output: test_name + '.test', -+ install_dir: installed_tests_metadir, -+ configuration: test_conf -+ ) -+ endif -+ - test(test_name, exe, env: env, timeout : 3 * 60) - endif - endforeach --- -2.31.1 - diff --git a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch new file mode 100644 index 00000000..f51df6d2 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch @@ -0,0 +1,107 @@ +From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001 +From: Claudius Heine +Date: Wed, 2 Feb 2022 13:47:02 +0100 +Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase + +This testcase seems to be flaky, and upstream marked it as such: +https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778 + +This patch removes the testcase to avoid it interfering with out ptest. + +Signed-off-by: Claudius Heine + +Upstream-Status: Inappropriate [needs proper upstream fix] +--- + tests/check/gst/gstbin.c | 69 ------------------- + 1 file changed, 69 deletions(-) + +diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c +index e366d5fe20..ac29d81474 100644 +--- a/tests/check/gst/gstbin.c ++++ b/tests/check/gst/gstbin.c +@@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children) + + GST_END_TEST; + +-GST_START_TEST (test_watch_for_state_change) +-{ +- GstElement *src, *sink, *bin; +- GstBus *bus; +- GstStateChangeReturn ret; +- +- bin = gst_element_factory_make ("bin", NULL); +- fail_unless (bin != NULL, "Could not create bin"); +- +- bus = g_object_new (gst_bus_get_type (), NULL); +- gst_object_ref_sink (bus); +- gst_element_set_bus (GST_ELEMENT_CAST (bin), bus); +- +- src = gst_element_factory_make ("fakesrc", NULL); +- fail_if (src == NULL, "Could not create fakesrc"); +- sink = gst_element_factory_make ("fakesink", NULL); +- fail_if (sink == NULL, "Could not create fakesink"); +- +- gst_bin_add (GST_BIN (bin), sink); +- gst_bin_add (GST_BIN (bin), src); +- +- fail_unless (gst_element_link (src, sink), "could not link src and sink"); +- +- /* change state, spawning two times three messages */ +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); +- fail_unless (ret == GST_STATE_CHANGE_ASYNC); +- ret = +- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, +- GST_CLOCK_TIME_NONE); +- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); +- +- pop_state_changed (bus, 6); +- pop_async_done (bus); +- pop_latency (bus); +- +- fail_unless (gst_bus_have_pending (bus) == FALSE, +- "Unexpected messages on bus"); +- +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); +- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); +- +- pop_state_changed (bus, 3); +- +- /* this one might return either SUCCESS or ASYNC, likely SUCCESS */ +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); +- gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE); +- +- pop_state_changed (bus, 3); +- if (ret == GST_STATE_CHANGE_ASYNC) { +- pop_async_done (bus); +- pop_latency (bus); +- } +- +- fail_unless (gst_bus_have_pending (bus) == FALSE, +- "Unexpected messages on bus"); +- +- gst_bus_set_flushing (bus, TRUE); +- +- ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL); +- fail_unless (ret == GST_STATE_CHANGE_SUCCESS); +- +- /* clean up */ +- gst_object_unref (bus); +- gst_object_unref (bin); +-} +- +-GST_END_TEST; +- + GST_START_TEST (test_state_change_error_message) + { + GstElement *src, *sink, *bin; +@@ -1956,7 +1888,6 @@ gst_bin_suite (void) + tcase_add_test (tc_chain, test_message_state_changed); + tcase_add_test (tc_chain, test_message_state_changed_child); + tcase_add_test (tc_chain, test_message_state_changed_children); +- tcase_add_test (tc_chain, test_watch_for_state_change); + tcase_add_test (tc_chain, test_state_change_error_message); + tcase_add_test (tc_chain, test_add_linked); + tcase_add_test (tc_chain, test_add_self); +-- +2.33.1 + 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 deleted file mode 100644 index 46813cec..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0006-tests-use-a-dictionaries-for-environment.patch +++ /dev/null @@ -1,48 +0,0 @@ -From e82dedec1803922656e92285fc1bb75b2cdc0aad Mon Sep 17 00:00:00 2001 -From: Jose Quaresma -Date: Sat, 24 Apr 2021 10:34:47 +0100 -Subject: [PATCH 3/4] tests: use a dictionaries for environment - -meson environment() can't be passed to configure_file and it is needed for installed_tests, -use a dictionary as this is simplest solution to install the environment. - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] - -Signed-off-by: Jose Quaresma ---- - tests/check/meson.build | 19 +++++++++++-------- - 1 file changed, 11 insertions(+), 8 deletions(-) - -diff --git a/tests/check/meson.build b/tests/check/meson.build -index a697a7b06..f64524904 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -161,14 +161,17 @@ foreach t : core_tests - install: installed_tests_enabled, - ) - -- env = environment() -- env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) -- env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') -- env.set('GST_STATE_IGNORE_ELEMENTS', '') -- env.set('CK_DEFAULT_TIMEOUT', '20') -- env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) -- env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') -- env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') -+ # environment() can't be passed to configure_file and it is needed for installed_tests -+ # use a dictionary as this is simplest solution to install the environment -+ env = { -+ 'GST_PLUGIN_PATH_1_0': meson.build_root(), -+ 'GST_PLUGIN_SYSTEM_PATH_1_0': '', -+ 'GST_STATE_IGNORE_ELEMENTS': '', -+ 'CK_DEFAULT_TIMEOUT': '20', -+ 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name), -+ 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner', -+ 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer', -+ } - - if installed_tests_enabled - test_conf = configuration_data() --- -2.31.1 - 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 deleted file mode 100644 index eabe7bcb..00000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0007-tests-install-the-environment-for-installed_tests.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 57d2965e979f886e03eecd7e351bf01812053971 Mon Sep 17 00:00:00 2001 -From: Jose Quaresma -Date: Sun, 2 May 2021 01:58:01 +0100 -Subject: [PATCH 4/4] tests: install the environment for installed_tests - -- adapt the test environment for installed_tests -- install the test environment for installed_tests -- run the tests using the installed environment - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] - -Signed-off-by: Jose Quaresma ---- - template.test.in | 2 +- - tests/check/meson.build | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletion(-) - -diff --git a/template.test.in b/template.test.in -index f701627f8..9a3fbdd09 100644 ---- a/template.test.in -+++ b/template.test.in -@@ -1,3 +1,3 @@ - [Test] - Type=session --Exec=@installed_tests_dir@/@program@ -+Exec=sh -c 'set -aex && source @installed_tests_dir@/@program@.env && exec @installed_tests_dir@/@program@' -diff --git a/tests/check/meson.build b/tests/check/meson.build -index f64524904..a67e0f8dd 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -183,6 +183,24 @@ foreach t : core_tests - install_dir: installed_tests_metadir, - configuration: test_conf - ) -+ -+ env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} -+ configure_file( -+ output: test_name + '.env', -+ install_dir: installed_tests_execdir, -+ configuration : env, -+ ) -+ # helper to convert a meson environment dictionay object exported with configure_file -+ # this also remove not needed variables for the installed tests -+ meson.add_postconf_script('sed', '-i', -+ '-e', '/^#define/!d', -+ '-e', 's/^#define //g', -+ '-e', '/^GST_PLUGIN_PATH_1_0/d', -+ '-e', '/^GST_PLUGIN_SYSTEM_PATH_1_0/d', -+ '-e', '/^GST_PLUGIN_SCANNER_1_0/d', -+ '-e', 's/ /=/', -+ join_paths(meson.current_build_dir(), test_name + '.env') -+ ) - endif - - test(test_name, exe, env: env, timeout : 3 * 60) --- -2.31.1 - -- cgit v1.2.3-54-g00ecf