summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/gstreamer/files
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-05-25 14:20:03 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-18 11:07:57 +0100
commit760127420cec852da7e8e72661c9ff70fa1c97c5 (patch)
treeb829a3b3965a225840029169ebef641bc5b60206 /meta/recipes-multimedia/gstreamer/files
parentc7fbb0251bf560c3e9ac847696e8a735dc8ee787 (diff)
downloadpoky-760127420cec852da7e8e72661c9ff70fa1c97c5.tar.gz
gstreamer: enable ptest support
Make sure that the tests are packaged and can be executed when ptest is enabled. Also, remove build host specific references from Makefile. (From OE-Core rev: d283b0eb909c78b020794ba78e7ec64c3fbee86f) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia/gstreamer/files')
-rw-r--r--meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch69
-rw-r--r--meta/recipes-multimedia/gstreamer/files/run-ptest3
2 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
new file mode 100644
index 0000000000..d02d869410
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
@@ -0,0 +1,69 @@
1From d61414bc17cf2df019510c2908048c4cabf5cf09 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 27 Feb 2018 09:27:01 +0800
4Subject: [PATCH] add targets for test installation
5
6Targets to make sure tests can be installed and then run on
7the target.
8
9Upstream-Status: Inappropriate [specific to oe setup]
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12
13---
14 tests/check/Makefile.am | 27 ++++++++++++++++++++-------
15 1 file changed, 20 insertions(+), 7 deletions(-)
16
17diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
18index 13b916d..a66786d 100644
19--- a/tests/check/Makefile.am
20+++ b/tests/check/Makefile.am
21@@ -8,11 +8,7 @@ REGISTRY_ENVIRONMENT = \
22 GST_REGISTRY=$(CHECK_REGISTRY)
23
24 AM_TESTS_ENVIRONMENT += \
25- GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" \
26- $(REGISTRY_ENVIRONMENT) \
27- GST_PLUGIN_SCANNER_1_0=$(top_builddir)/libs/gst/helpers/gst-plugin-scanner \
28- GST_PLUGIN_SYSTEM_PATH_1_0= \
29- GST_PLUGIN_PATH_1_0=$(top_builddir)/plugins
30+ GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"
31
32 plugindir = $(libdir)/gstreamer-@GST_API_VERSION@
33
34@@ -178,6 +174,23 @@ noinst_PROGRAMS =
35
36 TESTS = $(check_PROGRAMS)
37
38+install-ptest: $(TESTS)
39+ @$(INSTALL) -d $(DESTDIR)
40+ @for dir in `find -maxdepth 1 -type d`; do \
41+ if [ -x $$dir/.libs ]; then \
42+ $(INSTALL) -d $(DESTDIR)/$$dir; \
43+ $(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \
44+ fi \
45+ done
46+
47+runtests:
48+ @for b in $(TESTS); do \
49+ if [ -x $$b ]; then \
50+ $(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \
51+ --log-file $$b.log --trs-file $$b.trs $$b; \
52+ fi \
53+ done
54+
55 noinst_HEADERS = \
56 gst/capslist.h \
57 gst/struct_arm.h \
58@@ -221,9 +234,9 @@ gst_gstprintf_LDADD = \
59 $(LDADD)
60
61 elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
62- -DTESTFILE=\"$(top_srcdir)/configure.ac\"
63+ -DTESTFILE=\"Makefile\"
64 elements_filesrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \
65- -DTESTFILE=\"$(top_srcdir)/configure.ac\"
66+ -DTESTFILE=\"Makefile\"
67
68 libs_controller_LDADD = \
69 $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_API_VERSION@.la \
diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest b/meta/recipes-multimedia/gstreamer/files/run-ptest
new file mode 100644
index 0000000000..473d0b67a7
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
@@ -0,0 +1,3 @@
1#!/bin/sh
2
3make -k runtests