diff options
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0')
5 files changed, 0 insertions, 372 deletions
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 deleted file mode 100644 index 1b9278db0..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0001-tests-respect-the-idententaion-used-in-meson.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 559e1dd850b2b9eb3a415aa43e932e5e48f605cd 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] 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 | --- | ||
11 | tests/check/meson.build | 10 +++++----- | ||
12 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
13 | |||
14 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
15 | index 9787b0a..16caac7 100644 | ||
16 | --- a/tests/check/meson.build | ||
17 | +++ b/tests/check/meson.build | ||
18 | @@ -145,11 +145,11 @@ foreach t : core_tests | ||
19 | |||
20 | if not skip_test | ||
21 | exe = executable(test_name, fname, | ||
22 | - c_args : gst_c_args + test_defines, | ||
23 | - cpp_args : gst_c_args + test_defines, | ||
24 | - include_directories : [configinc], | ||
25 | - link_with : link_with_libs, | ||
26 | - dependencies : gst_deps + test_deps, | ||
27 | + c_args : gst_c_args + test_defines, | ||
28 | + cpp_args : gst_c_args + test_defines, | ||
29 | + include_directories : [configinc], | ||
30 | + link_with : link_with_libs, | ||
31 | + dependencies : gst_deps + test_deps, | ||
32 | ) | ||
33 | |||
34 | env = environment() | ||
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 deleted file mode 100644 index 568e38cbf..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | From 08b1aaff972a7f6349373fc1ad4cc23081adb52c 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] 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 | --- | ||
15 | meson.build | 4 ++++ | ||
16 | meson_options.txt | 1 + | ||
17 | tests/check/meson.build | 22 +++++++++++++++++++++- | ||
18 | tests/check/template.test.in | 3 +++ | ||
19 | 4 files changed, 29 insertions(+), 1 deletion(-) | ||
20 | create mode 100644 tests/check/template.test.in | ||
21 | |||
22 | diff --git a/meson.build b/meson.build | ||
23 | index f9f591d..3906fb3 100644 | ||
24 | --- a/meson.build | ||
25 | +++ b/meson.build | ||
26 | @@ -606,6 +606,10 @@ if bashcomp_dep.found() | ||
27 | endif | ||
28 | endif | ||
29 | |||
30 | +installed_tests_enabled = get_option('installed_tests') | ||
31 | +installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name()) | ||
32 | +installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name()) | ||
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 7363bdb..a34ba37 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/tests/check/meson.build b/tests/check/meson.build | ||
50 | index 16caac7..f2d400f 100644 | ||
51 | --- a/tests/check/meson.build | ||
52 | +++ b/tests/check/meson.build | ||
53 | @@ -124,10 +124,16 @@ test_defines = [ | ||
54 | '-UG_DISABLE_ASSERT', | ||
55 | '-UG_DISABLE_CAST_CHECKS', | ||
56 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', | ||
57 | - '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', | ||
58 | '-DGST_DISABLE_DEPRECATED', | ||
59 | ] | ||
60 | |||
61 | +testfile = meson.current_source_dir() + '/meson.build' | ||
62 | +if installed_tests_enabled | ||
63 | + install_data(testfile, install_dir : installed_tests_metadir, rename : 'testfile') | ||
64 | + testfile = installed_tests_metadir + '/testfile' | ||
65 | +endif | ||
66 | +test_defines += '-DTESTFILE="@0@"'.format(testfile) | ||
67 | + | ||
68 | # sanity checking | ||
69 | if get_option('check').disabled() | ||
70 | if get_option('tests').enabled() | ||
71 | @@ -150,6 +156,8 @@ foreach t : core_tests | ||
72 | include_directories : [configinc], | ||
73 | link_with : link_with_libs, | ||
74 | dependencies : gst_deps + test_deps, | ||
75 | + install_dir: installed_tests_execdir, | ||
76 | + install: installed_tests_enabled, | ||
77 | ) | ||
78 | |||
79 | env = environment() | ||
80 | @@ -161,6 +169,18 @@ foreach t : core_tests | ||
81 | env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') | ||
82 | env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') | ||
83 | |||
84 | + if installed_tests_enabled | ||
85 | + test_conf = configuration_data() | ||
86 | + test_conf.set('installed_tests_dir', join_paths(prefix, installed_tests_execdir)) | ||
87 | + test_conf.set('program', test_name) | ||
88 | + configure_file( | ||
89 | + input: 'template.test.in', | ||
90 | + output: test_name + '.test', | ||
91 | + install_dir: installed_tests_metadir, | ||
92 | + configuration: test_conf | ||
93 | + ) | ||
94 | + endif | ||
95 | + | ||
96 | test(test_name, exe, env: env, timeout : 3 * 60) | ||
97 | endif | ||
98 | endforeach | ||
99 | diff --git a/tests/check/template.test.in b/tests/check/template.test.in | ||
100 | new file mode 100644 | ||
101 | index 0000000..f701627 | ||
102 | --- /dev/null | ||
103 | +++ b/tests/check/template.test.in | ||
104 | @@ -0,0 +1,3 @@ | ||
105 | +[Test] | ||
106 | +Type=session | ||
107 | +Exec=@installed_tests_dir@/@program@ | ||
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 deleted file mode 100644 index 10a6dcc61..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0003-tests-use-a-dictionaries-for-environment.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From fe830f0f75f3b4b41e3dbef8d4cf6ee4103c9e06 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 | subprojects/gstreamer/tests/check/meson.build | 21 ++++++++++++------- | ||
14 | 1 file changed, 13 insertions(+), 8 deletions(-) | ||
15 | |||
16 | diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build | ||
17 | index 00a138a568..48ec2532f8 100644 | ||
18 | --- a/subprojects/gstreamer/tests/check/meson.build | ||
19 | +++ b/subprojects/gstreamer/tests/check/meson.build | ||
20 | @@ -161,14 +161,19 @@ foreach t : core_tests | ||
21 | install: installed_tests_enabled, | ||
22 | ) | ||
23 | |||
24 | - env = environment() | ||
25 | - env.set('GST_PLUGIN_PATH_1_0', meson.project_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 | + # meson environment object can't be passed to configure_file and | ||
33 | + # installed tests uses configure_file to install the environment. | ||
34 | + # use a dictionary as this is the simplest solution | ||
35 | + # to install the environment. | ||
36 | + env = { | ||
37 | + 'GST_PLUGIN_PATH_1_0': meson.project_build_root(), | ||
38 | + 'GST_PLUGIN_SYSTEM_PATH_1_0': '', | ||
39 | + 'GST_STATE_IGNORE_ELEMENTS': '', | ||
40 | + 'CK_DEFAULT_TIMEOUT': '20', | ||
41 | + 'GST_REGISTRY': '@0@/@1@.registry'.format(meson.current_build_dir(), test_name), | ||
42 | + 'GST_PLUGIN_SCANNER_1_0': gst_scanner_dir + '/gst-plugin-scanner', | ||
43 | + 'GST_PLUGIN_LOADING_WHITELIST': 'gstreamer', | ||
44 | + } | ||
45 | |||
46 | if installed_tests_enabled | ||
47 | test_conf = configuration_data() | ||
48 | -- | ||
49 | 2.33.1 | ||
50 | |||
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 deleted file mode 100644 index efa004f8c..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | From 4dcbabebca2ad6f1fdd59ee35a858082e87db7b6 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: add helper script to run the installed_tests | ||
5 | |||
6 | - this is a bash script that will run the installed_tests | ||
7 | with some of the environment variables used in the meson | ||
8 | testing framework. | ||
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 | subprojects/gstreamer/tests/check/meson.build | 17 +++++++++++++++++ | ||
15 | .../gstreamer/tests/check/template.sh.in | 9 +++++++++ | ||
16 | .../gstreamer/tests/check/template.test.in | 2 +- | ||
17 | 3 files changed, 27 insertions(+), 1 deletion(-) | ||
18 | create mode 100755 subprojects/gstreamer/tests/check/template.sh.in | ||
19 | |||
20 | diff --git a/subprojects/gstreamer/tests/check/meson.build b/subprojects/gstreamer/tests/check/meson.build | ||
21 | index 48ec2532f8..7dc4990d4e 100644 | ||
22 | --- a/subprojects/gstreamer/tests/check/meson.build | ||
23 | +++ b/subprojects/gstreamer/tests/check/meson.build | ||
24 | @@ -185,6 +185,23 @@ foreach t : core_tests | ||
25 | install_dir: installed_tests_metadir, | ||
26 | configuration: test_conf | ||
27 | ) | ||
28 | + | ||
29 | + # All the tests will be deployed on the target machine and | ||
30 | + # we use the home folder ~ for the registry which will then expand at runtime. | ||
31 | + # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly | ||
32 | + # is mounted using tmpfs and if the machine crash from some reason we can lost the registry | ||
33 | + # that is useful for debug propose of the tests itself. | ||
34 | + env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} | ||
35 | + | ||
36 | + # Set the full path for the test it self. | ||
37 | + env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)} | ||
38 | + | ||
39 | + configure_file( | ||
40 | + input : 'template.sh.in', | ||
41 | + output: test_name + '.sh', | ||
42 | + install_dir: installed_tests_execdir, | ||
43 | + configuration : env, | ||
44 | + ) | ||
45 | endif | ||
46 | |||
47 | test(test_name, exe, env: env, timeout : 3 * 60) | ||
48 | diff --git a/subprojects/gstreamer/tests/check/template.sh.in b/subprojects/gstreamer/tests/check/template.sh.in | ||
49 | new file mode 100755 | ||
50 | index 0000000000..cf7d31b0ea | ||
51 | --- /dev/null | ||
52 | +++ b/subprojects/gstreamer/tests/check/template.sh.in | ||
53 | @@ -0,0 +1,9 @@ | ||
54 | +#!/bin/sh | ||
55 | + | ||
56 | +set -ax | ||
57 | + | ||
58 | +CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@" | ||
59 | +GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" | ||
60 | +GST_REGISTRY=@GST_REGISTRY@ | ||
61 | +GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" | ||
62 | +exec @TEST@ | ||
63 | diff --git a/subprojects/gstreamer/tests/check/template.test.in b/subprojects/gstreamer/tests/check/template.test.in | ||
64 | index f701627f87..b74ef6ad73 100644 | ||
65 | --- a/subprojects/gstreamer/tests/check/template.test.in | ||
66 | +++ b/subprojects/gstreamer/tests/check/template.test.in | ||
67 | @@ -1,3 +1,3 @@ | ||
68 | [Test] | ||
69 | Type=session | ||
70 | -Exec=@installed_tests_dir@/@program@ | ||
71 | +Exec=@installed_tests_dir@/@program@.sh | ||
72 | -- | ||
73 | 2.33.1 | ||
74 | |||
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 deleted file mode 100644 index f51df6d20..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0005-tests-remove-gstbin-test_watch_for_state_change-test.patch +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | From b935abba3d8fa3ea1ce384c08e650afd8c20b78a Mon Sep 17 00:00:00 2001 | ||
2 | From: Claudius Heine <ch@denx.de> | ||
3 | Date: Wed, 2 Feb 2022 13:47:02 +0100 | ||
4 | Subject: [PATCH] tests: remove gstbin:test_watch_for_state_change testcase | ||
5 | |||
6 | This testcase seems to be flaky, and upstream marked it as such: | ||
7 | https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/778 | ||
8 | |||
9 | This patch removes the testcase to avoid it interfering with out ptest. | ||
10 | |||
11 | Signed-off-by: Claudius Heine <ch@denx.de> | ||
12 | |||
13 | Upstream-Status: Inappropriate [needs proper upstream fix] | ||
14 | --- | ||
15 | tests/check/gst/gstbin.c | 69 ------------------- | ||
16 | 1 file changed, 69 deletions(-) | ||
17 | |||
18 | diff --git a/tests/check/gst/gstbin.c b/tests/check/gst/gstbin.c | ||
19 | index e366d5fe20..ac29d81474 100644 | ||
20 | --- a/tests/check/gst/gstbin.c | ||
21 | +++ b/tests/check/gst/gstbin.c | ||
22 | @@ -691,74 +691,6 @@ GST_START_TEST (test_message_state_changed_children) | ||
23 | |||
24 | GST_END_TEST; | ||
25 | |||
26 | -GST_START_TEST (test_watch_for_state_change) | ||
27 | -{ | ||
28 | - GstElement *src, *sink, *bin; | ||
29 | - GstBus *bus; | ||
30 | - GstStateChangeReturn ret; | ||
31 | - | ||
32 | - bin = gst_element_factory_make ("bin", NULL); | ||
33 | - fail_unless (bin != NULL, "Could not create bin"); | ||
34 | - | ||
35 | - bus = g_object_new (gst_bus_get_type (), NULL); | ||
36 | - gst_object_ref_sink (bus); | ||
37 | - gst_element_set_bus (GST_ELEMENT_CAST (bin), bus); | ||
38 | - | ||
39 | - src = gst_element_factory_make ("fakesrc", NULL); | ||
40 | - fail_if (src == NULL, "Could not create fakesrc"); | ||
41 | - sink = gst_element_factory_make ("fakesink", NULL); | ||
42 | - fail_if (sink == NULL, "Could not create fakesink"); | ||
43 | - | ||
44 | - gst_bin_add (GST_BIN (bin), sink); | ||
45 | - gst_bin_add (GST_BIN (bin), src); | ||
46 | - | ||
47 | - fail_unless (gst_element_link (src, sink), "could not link src and sink"); | ||
48 | - | ||
49 | - /* change state, spawning two times three messages */ | ||
50 | - ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); | ||
51 | - fail_unless (ret == GST_STATE_CHANGE_ASYNC); | ||
52 | - ret = | ||
53 | - gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, | ||
54 | - GST_CLOCK_TIME_NONE); | ||
55 | - fail_unless (ret == GST_STATE_CHANGE_SUCCESS); | ||
56 | - | ||
57 | - pop_state_changed (bus, 6); | ||
58 | - pop_async_done (bus); | ||
59 | - pop_latency (bus); | ||
60 | - | ||
61 | - fail_unless (gst_bus_have_pending (bus) == FALSE, | ||
62 | - "Unexpected messages on bus"); | ||
63 | - | ||
64 | - ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING); | ||
65 | - fail_unless (ret == GST_STATE_CHANGE_SUCCESS); | ||
66 | - | ||
67 | - pop_state_changed (bus, 3); | ||
68 | - | ||
69 | - /* this one might return either SUCCESS or ASYNC, likely SUCCESS */ | ||
70 | - ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PAUSED); | ||
71 | - gst_element_get_state (GST_ELEMENT (bin), NULL, NULL, GST_CLOCK_TIME_NONE); | ||
72 | - | ||
73 | - pop_state_changed (bus, 3); | ||
74 | - if (ret == GST_STATE_CHANGE_ASYNC) { | ||
75 | - pop_async_done (bus); | ||
76 | - pop_latency (bus); | ||
77 | - } | ||
78 | - | ||
79 | - fail_unless (gst_bus_have_pending (bus) == FALSE, | ||
80 | - "Unexpected messages on bus"); | ||
81 | - | ||
82 | - gst_bus_set_flushing (bus, TRUE); | ||
83 | - | ||
84 | - ret = gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL); | ||
85 | - fail_unless (ret == GST_STATE_CHANGE_SUCCESS); | ||
86 | - | ||
87 | - /* clean up */ | ||
88 | - gst_object_unref (bus); | ||
89 | - gst_object_unref (bin); | ||
90 | -} | ||
91 | - | ||
92 | -GST_END_TEST; | ||
93 | - | ||
94 | GST_START_TEST (test_state_change_error_message) | ||
95 | { | ||
96 | GstElement *src, *sink, *bin; | ||
97 | @@ -1956,7 +1888,6 @@ gst_bin_suite (void) | ||
98 | tcase_add_test (tc_chain, test_message_state_changed); | ||
99 | tcase_add_test (tc_chain, test_message_state_changed_child); | ||
100 | tcase_add_test (tc_chain, test_message_state_changed_children); | ||
101 | - tcase_add_test (tc_chain, test_watch_for_state_change); | ||
102 | tcase_add_test (tc_chain, test_state_change_error_message); | ||
103 | tcase_add_test (tc_chain, test_add_linked); | ||
104 | tcase_add_test (tc_chain, test_add_self); | ||
105 | -- | ||
106 | 2.33.1 | ||
107 | |||