blob: d02d869410707a30cf8899b6ae9eb0e04f4d8368 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001From 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 \