diff options
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/gstreamer1.0')
9 files changed, 277 insertions, 440 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch deleted file mode 100644 index 17f8a0beb7..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ /dev/null @@ -1,37 +0,0 @@ -From f700975f514758a4a7582c2c972fa54ecfca3302 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 25 Jan 2018 17:55:02 +0200 -Subject: [PATCH 1/4] gst/gstpluginloader.c: 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. - -written by: Alexander Kanavin <alex.kanavin@gmail.com> - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/669] -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - gst/gstpluginloader.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/gst/gstpluginloader.c b/gst/gstpluginloader.c -index d1e404d..2e00c3c 100644 ---- a/gst/gstpluginloader.c -+++ b/gst/gstpluginloader.c -@@ -475,9 +475,7 @@ gst_plugin_loader_spawn (GstPluginLoader * loader) - helper_bin = g_strdup (env); - res = gst_plugin_loader_try_helper (loader, helper_bin); - g_free (helper_bin); -- } -- -- if (!res) { -+ } else { - GST_LOG ("Trying installed plugin scanner"); - - #ifdef G_OS_WIN32 --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst_private.h-increse-padding-in-struct-_GstClockEnt.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst_private.h-increse-padding-in-struct-_GstClockEnt.patch deleted file mode 100644 index a2d215d72d..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst_private.h-increse-padding-in-struct-_GstClockEnt.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 4449246a8d788e71dfe4679fba95955cec5894c1 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 3 Nov 2020 22:58:26 -0800 -Subject: [PATCH] gst_private.h: increse padding in struct _GstClockEntryImpl - -When compiling for 32bit architectures with 64bit time_t e.g. riscv32, -the static assert that the GstClockEntryImpl smaller or -equal to the struct _GstClockEntryImpl triggered. -(they were 12bytes off). - -To fix this, the padding is increased by 8 bytes (on 32bit). - -Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/694] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - gst/gst_private.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst/gst_private.h b/gst/gst_private.h -index a8897e1..8252ede 100644 ---- a/gst/gst_private.h -+++ b/gst/gst_private.h -@@ -522,7 +522,7 @@ struct _GstClockEntryImpl - GstClockEntry entry; - GWeakRef clock; - GDestroyNotify destroy_entry; -- gpointer padding[19]; /* padding for allowing e.g. systemclock -+ gpointer padding[21]; /* padding for allowing e.g. systemclock - * to add data in lieu of overridable - * virtual functions on the clock */ - }; --- -2.29.2 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch new file mode 100644 index 0000000000..0d839bd6c8 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch @@ -0,0 +1,34 @@ +From 5372cd5bf2a9dd247b9c5fc6e4fe248046dbb085 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sun, 11 Apr 2021 19:48:13 +0100 +Subject: [PATCH] tests: respect the idententaion used in meson + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/789] + +Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> + +--- + 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 9787b0a..16caac7 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -145,11 +145,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 : gst_deps + test_deps, ++ c_args : gst_c_args + test_defines, ++ cpp_args : gst_c_args + test_defines, ++ include_directories : [configinc], ++ link_with : link_with_libs, ++ dependencies : gst_deps + test_deps, + ) + + env = environment() diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch deleted file mode 100644 index c8bd58d471..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-Remove-unused-valgrind-detection.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 355dd938bfb2cd36d6c3c4ed59ba1dcafdc78d95 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> -Date: Fri, 14 Aug 2020 16:38:26 +0100 -Subject: [PATCH 2/4] 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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/595> - -Upstream-Status: Backport [a2cbf75523cdf8a4df1baa7007d86ef455972245] - -Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> ---- - 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 1b0f02b..a8897e1 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 37987d3..15f522e 100644 ---- a/gst/gstinfo.c -+++ b/gst/gstinfo.c -@@ -304,36 +304,6 @@ static gboolean pretty_tags = PRETTY_TAGS_DEFAULT; - static volatile gint G_GNUC_MAY_ALIAS __default_level = GST_LEVEL_DEFAULT; - static volatile 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) -@@ -462,9 +432,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")) -@@ -2502,12 +2469,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 f95b4f7..143c043 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', - ] --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch new file mode 100644 index 0000000000..64717e66c3 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch @@ -0,0 +1,107 @@ +From 27e977d03b0f7c1d0bf19621ef0cec0585410e7b Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sun, 11 Apr 2021 19:48:13 +0100 +Subject: [PATCH] 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 <quaresma.jose@gmail.com> + +--- + meson.build | 4 ++++ + meson_options.txt | 1 + + tests/check/meson.build | 22 +++++++++++++++++++++- + tests/check/template.test.in | 3 +++ + 4 files changed, 29 insertions(+), 1 deletion(-) + create mode 100644 tests/check/template.test.in + +diff --git a/meson.build b/meson.build +index 60c7bec..f7650b1 100644 +--- a/meson.build ++++ b/meson.build +@@ -606,6 +606,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/meson_options.txt b/meson_options.txt +index 7363bdb..a34ba37 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/tests/check/meson.build b/tests/check/meson.build +index 16caac7..f2d400f 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() +@@ -150,6 +156,8 @@ foreach t : core_tests + include_directories : [configinc], + link_with : link_with_libs, + dependencies : gst_deps + test_deps, ++ install_dir: installed_tests_execdir, ++ install: installed_tests_enabled, + ) + + env = environment() +@@ -161,6 +169,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/tests/check/template.test.in b/tests/check/template.test.in +new file mode 100644 +index 0000000..f701627 +--- /dev/null ++++ b/tests/check/template.test.in +@@ -0,0 +1,3 @@ ++[Test] ++Type=session ++Exec=@installed_tests_dir@/@program@ diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-option-for-installed-tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-option-for-installed-tests.patch deleted file mode 100644 index 1c0e1f8171..0000000000 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-option-for-installed-tests.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 24867db22a5cc35e7643bc218e959ce56c306aca Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <crg7475@mailbox.org> -Date: Fri, 25 Oct 2019 00:06:26 +0200 -Subject: [PATCH 3/4] meson: Add option for installed tests - -This adds an option for producing installed versions of the unit tests. -These versions don't need meson to run (only a small shell script). This -makes it easier to run cross compiled tests on a target machine. - -Upstream-Status: Pending - -Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> ---- - build-aux/gen-installed-test-desc.py | 18 ++++++ - build-aux/gen-installed-test-shscript.py | 25 ++++++++ - meson_options.txt | 2 + - tests/check/meson.build | 46 +++++++++++++- - tests/files/testfile | 80 ++++++++++++++++++++++++ - 5 files changed, 170 insertions(+), 1 deletion(-) - create mode 100644 build-aux/gen-installed-test-desc.py - create mode 100644 build-aux/gen-installed-test-shscript.py - create mode 100644 tests/files/testfile - -diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py -new file mode 100644 -index 0000000..69e8a0f ---- /dev/null -+++ b/build-aux/gen-installed-test-desc.py -@@ -0,0 +1,18 @@ -+import sys -+import os -+import argparse -+ -+def write_template(filename, data): -+ with open(filename, 'w') as f: -+ f.write(data) -+ -+def build_template(testdir, testname): -+ return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname)) -+ -+argparser = argparse.ArgumentParser(description='Generate installed-test data.') -+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') -+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') -+argparser.add_argument('--output', metavar='file', required=True, help='Output file') -+args = argparser.parse_args() -+ -+write_template(args.output, build_template(args.test_execdir, args.testname)) -diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py -new file mode 100644 -index 0000000..5da86fb ---- /dev/null -+++ b/build-aux/gen-installed-test-shscript.py -@@ -0,0 +1,25 @@ -+import sys -+import os -+import argparse -+ -+def write_template(filename, data): -+ with open(filename, 'w') as f: -+ f.write(data) -+ -+def build_template(testdir, testname): -+ return ''.join([ -+ "#!/usr/bin/env sh\n", -+ "export GST_STATE_IGNORE_ELEMENTS=''\n", -+ "export CK_DEFAULT_TIMEOUT=20\n", -+ "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n", -+ "{}\n".format(os.path.join(testdir, testname)), -+ ]) -+ -+argparser = argparse.ArgumentParser(description='Generate installed-test data.') -+argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') -+argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') -+argparser.add_argument('--output', metavar='file', required=True, help='Output file') -+args = argparser.parse_args() -+ -+write_template(args.output, build_template(args.test_execdir, args.testname)) -+os.chmod(args.output, 0o755) -diff --git a/meson_options.txt b/meson_options.txt -index 72c3997..346c423 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -15,6 +15,8 @@ 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') -+option('test-files-path', type : 'string', description : 'Path where to find test files') - - # Feature options - option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') -diff --git a/tests/check/meson.build b/tests/check/meson.build -index 372ea41..bb0dcfa 100644 ---- a/tests/check/meson.build -+++ b/tests/check/meson.build -@@ -120,11 +120,17 @@ if add_languages('cpp', native: false, required: false) - ] - endif - -+test_files_path = get_option('test-files-path') -+if test_files_path == '' -+ test_files_path = meson.current_source_dir() + '/../files' -+endif -+message('Using path "@0@" as the path to read test files from'.format(test_files_path)) -+ - 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"', -+ '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'), - '-DGST_DISABLE_DEPRECATED', - ] - -@@ -138,6 +144,14 @@ endif - glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep] - gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep] - -+installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0') -+installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0') -+installed_tests_enabled = get_option('installed-tests') -+ -+python = import('python').find_installation() -+gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py') -+gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py') -+ - foreach t : core_tests - fname = t[0] - test_name = fname.split('.')[0].underscorify() -@@ -151,8 +165,38 @@ 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 - ) - -+ if installed_tests_enabled -+ installed_test_shscript = test_name + '.sh' -+ shscript = custom_target (test_name + '_shscript', -+ output: installed_test_shscript, -+ command: [ -+ python, -+ gen_installed_test_shscript, -+ '--test-execdir=@0@'.format(installed_tests_execdir), -+ '--testname=@0@'.format(test_name), -+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)), -+ ], -+ install: true, -+ install_dir: installed_tests_execdir) -+ -+ installed_test_desc = test_name + '.test' -+ data = custom_target(test_name + '_desc', -+ output: installed_test_desc, -+ command: [ -+ python, -+ gen_installed_test_desc, -+ '--test-execdir=@0@'.format(installed_tests_execdir), -+ '--testname=@0@'.format(installed_test_shscript), -+ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)), -+ ], -+ install: true, -+ install_dir: installed_tests_datadir) -+ endif -+ - env = environment() - env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) - env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') -diff --git a/tests/files/testfile b/tests/files/testfile -new file mode 100644 -index 0000000..89954e0 ---- /dev/null -+++ b/tests/files/testfile -@@ -0,0 +1,80 @@ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ -+................................................................................ --- -2.28.0 - diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch new file mode 100644 index 0000000000..0fd830f150 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch @@ -0,0 +1,48 @@ +From 7041bc5adf9501beb1428d8bbae6b351a6bf07f9 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sat, 24 Apr 2021 10:34:47 +0100 +Subject: [PATCH] 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 <quaresma.jose@gmail.com> + +--- + tests/check/meson.build | 21 +++++++++++++-------- + 1 file changed, 13 insertions(+), 8 deletions(-) + +diff --git a/tests/check/meson.build b/tests/check/meson.build +index f2d400f..50dff7f 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -160,14 +160,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() diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch new file mode 100644 index 0000000000..5689dc9fbb --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch @@ -0,0 +1,72 @@ +From 1b1d1ce4227b6bea7c7def5dac4a663486e070c2 Mon Sep 17 00:00:00 2001 +From: Jose Quaresma <quaresma.jose@gmail.com> +Date: Sun, 2 May 2021 01:58:01 +0100 +Subject: [PATCH] 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 <quaresma.jose@gmail.com> + +--- + tests/check/meson.build | 17 +++++++++++++++++ + tests/check/template.sh.in | 9 +++++++++ + tests/check/template.test.in | 2 +- + 3 files changed, 27 insertions(+), 1 deletion(-) + create mode 100755 tests/check/template.sh.in + +diff --git a/tests/check/meson.build b/tests/check/meson.build +index 50dff7f..2b9e979 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -184,6 +184,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/tests/check/template.sh.in b/tests/check/template.sh.in +new file mode 100755 +index 0000000..cf7d31b +--- /dev/null ++++ b/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/tests/check/template.test.in b/tests/check/template.test.in +index f701627..b74ef6a 100644 +--- a/tests/check/template.test.in ++++ b/tests/check/template.test.in +@@ -1,3 +1,3 @@ + [Test] + Type=session +-Exec=@installed_tests_dir@/@program@ ++Exec=@installed_tests_dir@/@program@.sh diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest new file mode 100755 index 0000000000..7d0312005f --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0/run-ptest @@ -0,0 +1,16 @@ +#! /bin/sh + +# Multiply all timeouts by ten so they're more likely to work +# on a loaded system. +export CK_TIMEOUT_MULTIPLIER=5 + +# Skip some tests that we know are problematic +export GST_CHECKS_IGNORE="" +# gstnetclientclock.c:test_functioning is very sensitive to load +GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_functioning" + +# aggregator.c:test_infinite_seek_50_src_live is known to be flaky +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/410 +GST_CHECKS_IGNORE="$GST_CHECKS_IGNORE,test_infinite_seek_50_src_live" + +gnome-desktop-testing-runner gstreamer |