diff options
Diffstat (limited to 'meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch')
-rw-r--r-- | meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch new file mode 100644 index 00000000..5689dc9f --- /dev/null +++ b/meta-xilinx-multimedia/recipes-multimedia/gstreamer/gstreamer1.0/0004-tests-add-helper-script-to-run-the-installed_tests.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 1b1d1ce4227b6bea7c7def5dac4a663486e070c2 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] 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 | --- | ||
15 | tests/check/meson.build | 17 +++++++++++++++++ | ||
16 | tests/check/template.sh.in | 9 +++++++++ | ||
17 | tests/check/template.test.in | 2 +- | ||
18 | 3 files changed, 27 insertions(+), 1 deletion(-) | ||
19 | create mode 100755 tests/check/template.sh.in | ||
20 | |||
21 | diff --git a/tests/check/meson.build b/tests/check/meson.build | ||
22 | index 50dff7f..2b9e979 100644 | ||
23 | --- a/tests/check/meson.build | ||
24 | +++ b/tests/check/meson.build | ||
25 | @@ -184,6 +184,23 @@ foreach t : core_tests | ||
26 | install_dir: installed_tests_metadir, | ||
27 | configuration: test_conf | ||
28 | ) | ||
29 | + | ||
30 | + # All the tests will be deployed on the target machine and | ||
31 | + # we use the home folder ~ for the registry which will then expand at runtime. | ||
32 | + # Using the /tmp/gstreamer-1.0/@0@.registry can be problematic as it mostly | ||
33 | + # is mounted using tmpfs and if the machine crash from some reason we can lost the registry | ||
34 | + # that is useful for debug propose of the tests itself. | ||
35 | + env += {'GST_REGISTRY': '~/.cache/gstreamer-1.0/@0@.registry'.format(test_name)} | ||
36 | + | ||
37 | + # Set the full path for the test it self. | ||
38 | + env += {'TEST': '@0@/@1@'.format(join_paths(prefix, installed_tests_execdir), test_name)} | ||
39 | + | ||
40 | + configure_file( | ||
41 | + input : 'template.sh.in', | ||
42 | + output: test_name + '.sh', | ||
43 | + install_dir: installed_tests_execdir, | ||
44 | + configuration : env, | ||
45 | + ) | ||
46 | endif | ||
47 | |||
48 | test(test_name, exe, env: env, timeout : 3 * 60) | ||
49 | diff --git a/tests/check/template.sh.in b/tests/check/template.sh.in | ||
50 | new file mode 100755 | ||
51 | index 0000000..cf7d31b | ||
52 | --- /dev/null | ||
53 | +++ b/tests/check/template.sh.in | ||
54 | @@ -0,0 +1,9 @@ | ||
55 | +#!/bin/sh | ||
56 | + | ||
57 | +set -ax | ||
58 | + | ||
59 | +CK_DEFAULT_TIMEOUT="@CK_DEFAULT_TIMEOUT@" | ||
60 | +GST_PLUGIN_LOADING_WHITELIST="@GST_PLUGIN_LOADING_WHITELIST@" | ||
61 | +GST_REGISTRY=@GST_REGISTRY@ | ||
62 | +GST_STATE_IGNORE_ELEMENTS="@GST_STATE_IGNORE_ELEMENTS@" | ||
63 | +exec @TEST@ | ||
64 | diff --git a/tests/check/template.test.in b/tests/check/template.test.in | ||
65 | index f701627..b74ef6a 100644 | ||
66 | --- a/tests/check/template.test.in | ||
67 | +++ b/tests/check/template.test.in | ||
68 | @@ -1,3 +1,3 @@ | ||
69 | [Test] | ||
70 | Type=session | ||
71 | -Exec=@installed_tests_dir@/@program@ | ||
72 | +Exec=@installed_tests_dir@/@program@.sh | ||