diff options
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch')
| -rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch | 109 |
1 files changed, 0 insertions, 109 deletions
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 456f07626..000000000 --- a/recipes-multimedia/gstreamer/gstreamer1.0/0002-tests-add-support-for-install-the-tests.patch +++ /dev/null | |||
| @@ -1,109 +0,0 @@ | |||
| 1 | From 330e15374bb30ac29ee72c4b3de79c17b1157112 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 | 21 ++++++++++++++++++++- | ||
| 18 | tests/check/template.test.in | 3 +++ | ||
| 19 | 4 files changed, 28 insertions(+), 1 deletion(-) | ||
| 20 | create mode 100644 tests/check/template.test.in | ||
| 21 | |||
| 22 | diff --git a/meson.build b/meson.build | ||
| 23 | index 540d6d290e10..0267f22a79ea 100644 | ||
| 24 | --- a/meson.build | ||
| 25 | +++ b/meson.build | ||
| 26 | @@ -624,6 +624,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 340fb5801d02..5b87f68e8d7f 100644 | ||
| 39 | --- a/meson_options.txt | ||
| 40 | +++ b/meson_options.txt | ||
| 41 | @@ -16,6 +16,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 e9501feb2af5..fd5a99611e3d 100644 | ||
| 51 | --- a/tests/check/meson.build | ||
| 52 | +++ b/tests/check/meson.build | ||
| 53 | @@ -125,10 +125,16 @@ test_defines = [ | ||
| 54 | '-UG_DISABLE_ASSERT', | ||
| 55 | '-UG_DISABLE_CAST_CHECKS', | ||
| 56 | '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', | ||
| 57 | - '-DTESTFILE="' + fsmod.as_posix(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 | @@ -151,6 +157,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,17 @@ foreach t : core_tests | ||
| 81 | env.set('GST_REGISTRY', '@0@/@1@.registry'.format(meson.current_build_dir(), test_name)) | ||
| 82 | env.set('GST_PLUGIN_SCANNER_1_0', gst_scanner_dir + '/gst-plugin-scanner') | ||
| 83 | env.set('GST_PLUGIN_LOADING_WHITELIST', 'gstreamer') | ||
| 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 | diff --git a/tests/check/template.test.in b/tests/check/template.test.in | ||
| 99 | new file mode 100644 | ||
| 100 | index 000000000000..f701627f87a6 | ||
| 101 | --- /dev/null | ||
| 102 | +++ b/tests/check/template.test.in | ||
| 103 | @@ -0,0 +1,3 @@ | ||
| 104 | +[Test] | ||
| 105 | +Type=session | ||
| 106 | +Exec=@installed_tests_dir@/@program@ | ||
| 107 | -- | ||
| 108 | 2.39.2 | ||
| 109 | |||
