Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | From d61414bc17cf2df019510c2908048c4cabf5cf09 Mon Sep 17 00:00:00 2001 |
| 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
| 3 | Date: Tue, 27 Feb 2018 09:27:01 +0800 |
| 4 | Subject: [PATCH] add targets for test installation |
| 5 | |
| 6 | Targets to make sure tests can be installed and then run on |
| 7 | the target. |
| 8 | |
| 9 | Upstream-Status: Inappropriate [specific to oe setup] |
| 10 | |
| 11 | Signed-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 | |
| 17 | diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am |
| 18 | index 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 \ |