All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gstreamer: enable ptest support
@ 2018-02-27  8:56 Anuj Mittal
  2018-02-27  9:38 ` Otavio Salvador
  2018-02-28  2:51 ` [PATCH v2] " Anuj Mittal
  0 siblings, 2 replies; 10+ messages in thread
From: Anuj Mittal @ 2018-02-27  8:56 UTC (permalink / raw)
  To: openembedded-core

Make sure that the tests are packaged and can be executed
when ptest is enabled. Also, remove build host specific references
from Makefile.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 .../files/add-a-target-to-compile-tests.patch      | 61 ++++++++++++++++++++++
 meta/recipes-multimedia/gstreamer/files/run-ptest  |  3 ++
 meta/recipes-multimedia/gstreamer/gstreamer1.0.inc | 24 ++++++++-
 3 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
 create mode 100644 meta/recipes-multimedia/gstreamer/files/run-ptest

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 0000000..1324b57
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
@@ -0,0 +1,61 @@
+From 442691c7778601e3e4b88d0fbfb9d512ed34f414 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 27 Feb 2018 09:27:01 +0800
+Subject: [PATCH] add targets for test installation
+
+Targets to make sure tests can be installed and then run on
+the target.
+
+Upstream-Status: Pending [specific to oe setup]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ Makefile.am             |  3 +++
+ tests/check/Makefile.am | 17 +++++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index de057c4..42e90fe 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -96,6 +96,9 @@ check-torture:
+ 
+ build-checks:
+ 	$(MAKE) -C tests/check build-checks
++
++install-ptest:
++	$(MAKE) -C tests/check DESTDIR=$(DESTDIR) $@
+ else
+ check-valgrind:
+ 	echo "'check' library not installed, skipping"
+diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
+index 13b916d..05ab267 100644
+--- a/tests/check/Makefile.am
++++ b/tests/check/Makefile.am
+@@ -178,6 +178,23 @@ noinst_PROGRAMS =
+ 
+ TESTS = $(check_PROGRAMS)
+ 
++install-ptest: $(TESTS)
++	@$(INSTALL) -d $(DESTDIR)
++	@for dir in gst libs tools pipelines elements generic; do \
++		if [ -x $$dir/.libs ]; then \
++			$(INSTALL) -d $(DESTDIR)/$$dir; \
++			$(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \
++		fi \
++	done
++
++runtests:
++	@for b in $(TESTS); do \
++		if [ -x $$b ]; then \
++			$(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \
++			--log-file $$b.log --trs-file $$b.trs $$b; \
++		fi \
++	done
++
+ noinst_HEADERS = \
+ 	gst/capslist.h \
+ 	gst/struct_arm.h \
+-- 
+2.7.4
+
diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest b/meta/recipes-multimedia/gstreamer/files/run-ptest
new file mode 100644
index 0000000..473d0b6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k runtests
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index c2df1f3..9371132 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
 
 DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
 
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest
 
 # This way common/m4/introspection.m4 will come first
 # (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
@@ -18,9 +18,12 @@ SRC_URI_append = " \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
     file://gtk-doc-tweaks.patch \
     file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
+    file://add-a-target-to-compile-tests.patch \
+    file://run-ptest \
 "
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
+                   "
 
 PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
@@ -59,3 +62,20 @@ do_configure[prefuncs] += "delete_pkg_m4_file"
 do_compile_prepend() {
         export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
 }
+
+do_compile_ptest() {
+        oe_runmake build-checks
+}
+
+do_install_ptest() {
+        install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
+        install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
+        sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+            -e 's|${DEBUG_PREFIX_MAP}||g' \
+            -e 's:${HOSTTOOLS_DIR}/::g' \
+            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
+            -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+            -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
+            -i ${D}${PTEST_PATH}/Makefile
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] gstreamer: enable ptest support
  2018-02-27  8:56 [PATCH] gstreamer: enable ptest support Anuj Mittal
@ 2018-02-27  9:38 ` Otavio Salvador
  2018-02-27  9:42   ` Anuj Mittal
  2018-02-28  2:51 ` [PATCH v2] " Anuj Mittal
  1 sibling, 1 reply; 10+ messages in thread
From: Otavio Salvador @ 2018-02-27  9:38 UTC (permalink / raw)
  To: Anuj Mittal; +Cc: Patches and discussions about the oe-core layer

On Tue, Feb 27, 2018 at 5:56 AM, Anuj Mittal <anuj.mittal@intel.com> wrote:
...
> +++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
> @@ -0,0 +1,61 @@
> +From 442691c7778601e3e4b88d0fbfb9d512ed34f414 Mon Sep 17 00:00:00 2001
> +From: Anuj Mittal <anuj.mittal@intel.com>
> +Date: Tue, 27 Feb 2018 09:27:01 +0800
> +Subject: [PATCH] add targets for test installation
> +
> +Targets to make sure tests can be installed and then run on
> +the target.
> +
> +Upstream-Status: Pending [specific to oe setup]

You choose the wrong status. It should be Inappropriate.

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] gstreamer: enable ptest support
  2018-02-27  9:38 ` Otavio Salvador
@ 2018-02-27  9:42   ` Anuj Mittal
  0 siblings, 0 replies; 10+ messages in thread
From: Anuj Mittal @ 2018-02-27  9:42 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: Patches and discussions about the oe-core layer

On 02/27/2018 05:38 PM, Otavio Salvador wrote:
> On Tue, Feb 27, 2018 at 5:56 AM, Anuj Mittal <anuj.mittal@intel.com> wrote:
> ...
>> +++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
>> @@ -0,0 +1,61 @@
>> +From 442691c7778601e3e4b88d0fbfb9d512ed34f414 Mon Sep 17 00:00:00 2001
>> +From: Anuj Mittal <anuj.mittal@intel.com>
>> +Date: Tue, 27 Feb 2018 09:27:01 +0800
>> +Subject: [PATCH] add targets for test installation
>> +
>> +Targets to make sure tests can be installed and then run on
>> +the target.
>> +
>> +Upstream-Status: Pending [specific to oe setup]
> 
> You choose the wrong status. It should be Inappropriate.
> 

Yes, you're right. Thank you! I will wait for other comments and send v2
later.

Thanks,
Anuj


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] gstreamer: enable ptest support
  2018-02-27  8:56 [PATCH] gstreamer: enable ptest support Anuj Mittal
  2018-02-27  9:38 ` Otavio Salvador
@ 2018-02-28  2:51 ` Anuj Mittal
  2018-03-14  2:41   ` Anuj Mittal
                     ` (2 more replies)
  1 sibling, 3 replies; 10+ messages in thread
From: Anuj Mittal @ 2018-02-28  2:51 UTC (permalink / raw)
  To: openembedded-core

Make sure that the tests are packaged and can be executed
when ptest is enabled. Also, remove build host specific references
from Makefile.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 .../files/add-a-target-to-compile-tests.patch      | 61 ++++++++++++++++++++++
 meta/recipes-multimedia/gstreamer/files/run-ptest  |  3 ++
 meta/recipes-multimedia/gstreamer/gstreamer1.0.inc | 24 ++++++++-
 3 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
 create mode 100644 meta/recipes-multimedia/gstreamer/files/run-ptest

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 0000000..b1405b6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
@@ -0,0 +1,61 @@
+From 442691c7778601e3e4b88d0fbfb9d512ed34f414 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 27 Feb 2018 09:27:01 +0800
+Subject: [PATCH] add targets for test installation
+
+Targets to make sure tests can be installed and then run on
+the target.
+
+Upstream-Status: Inappropriate [specific to oe setup]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ Makefile.am             |  3 +++
+ tests/check/Makefile.am | 17 +++++++++++++++++
+ 2 files changed, 20 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index de057c4..42e90fe 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -96,6 +96,9 @@ check-torture:
+ 
+ build-checks:
+ 	$(MAKE) -C tests/check build-checks
++
++install-ptest:
++	$(MAKE) -C tests/check DESTDIR=$(DESTDIR) $@
+ else
+ check-valgrind:
+ 	echo "'check' library not installed, skipping"
+diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
+index 13b916d..05ab267 100644
+--- a/tests/check/Makefile.am
++++ b/tests/check/Makefile.am
+@@ -178,6 +178,23 @@ noinst_PROGRAMS =
+ 
+ TESTS = $(check_PROGRAMS)
+ 
++install-ptest: $(TESTS)
++	@$(INSTALL) -d $(DESTDIR)
++	@for dir in gst libs tools pipelines elements generic; do \
++		if [ -x $$dir/.libs ]; then \
++			$(INSTALL) -d $(DESTDIR)/$$dir; \
++			$(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \
++		fi \
++	done
++
++runtests:
++	@for b in $(TESTS); do \
++		if [ -x $$b ]; then \
++			$(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \
++			--log-file $$b.log --trs-file $$b.trs $$b; \
++		fi \
++	done
++
+ noinst_HEADERS = \
+ 	gst/capslist.h \
+ 	gst/struct_arm.h \
+-- 
+2.7.4
+
diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest b/meta/recipes-multimedia/gstreamer/files/run-ptest
new file mode 100644
index 0000000..473d0b6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k runtests
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index c2df1f3..9371132 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
 
 DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
 
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest
 
 # This way common/m4/introspection.m4 will come first
 # (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
@@ -18,9 +18,12 @@ SRC_URI_append = " \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
     file://gtk-doc-tweaks.patch \
     file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
+    file://add-a-target-to-compile-tests.patch \
+    file://run-ptest \
 "
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
+                   "
 
 PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
@@ -59,3 +62,20 @@ do_configure[prefuncs] += "delete_pkg_m4_file"
 do_compile_prepend() {
         export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
 }
+
+do_compile_ptest() {
+        oe_runmake build-checks
+}
+
+do_install_ptest() {
+        install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
+        install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
+        sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+            -e 's|${DEBUG_PREFIX_MAP}||g' \
+            -e 's:${HOSTTOOLS_DIR}/::g' \
+            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
+            -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+            -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
+            -i ${D}${PTEST_PATH}/Makefile
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] gstreamer: enable ptest support
  2018-02-28  2:51 ` [PATCH v2] " Anuj Mittal
@ 2018-03-14  2:41   ` Anuj Mittal
  2018-03-14 17:03   ` Burton, Ross
  2018-03-19  6:49   ` [PATCH v3] " Anuj Mittal
  2 siblings, 0 replies; 10+ messages in thread
From: Anuj Mittal @ 2018-03-14  2:41 UTC (permalink / raw)
  To: openembedded-core

Ping. Was there anything wrong with this?

Thanks,
Anuj

On 02/28/2018 10:51 AM, Anuj Mittal wrote:
> Make sure that the tests are packaged and can be executed
> when ptest is enabled. Also, remove build host specific references
> from Makefile.
> 
> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> ---
>  .../files/add-a-target-to-compile-tests.patch      | 61 ++++++++++++++++++++++
>  meta/recipes-multimedia/gstreamer/files/run-ptest  |  3 ++
>  meta/recipes-multimedia/gstreamer/gstreamer1.0.inc | 24 ++++++++-
>  3 files changed, 86 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
>  create mode 100644 meta/recipes-multimedia/gstreamer/files/run-ptest
> 
> 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 0000000..b1405b6
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
> @@ -0,0 +1,61 @@
> +From 442691c7778601e3e4b88d0fbfb9d512ed34f414 Mon Sep 17 00:00:00 2001
> +From: Anuj Mittal <anuj.mittal@intel.com>
> +Date: Tue, 27 Feb 2018 09:27:01 +0800
> +Subject: [PATCH] add targets for test installation
> +
> +Targets to make sure tests can be installed and then run on
> +the target.
> +
> +Upstream-Status: Inappropriate [specific to oe setup]
> +
> +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> +---
> + Makefile.am             |  3 +++
> + tests/check/Makefile.am | 17 +++++++++++++++++
> + 2 files changed, 20 insertions(+)
> +
> +diff --git a/Makefile.am b/Makefile.am
> +index de057c4..42e90fe 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -96,6 +96,9 @@ check-torture:
> + 
> + build-checks:
> + 	$(MAKE) -C tests/check build-checks
> ++
> ++install-ptest:
> ++	$(MAKE) -C tests/check DESTDIR=$(DESTDIR) $@
> + else
> + check-valgrind:
> + 	echo "'check' library not installed, skipping"
> +diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
> +index 13b916d..05ab267 100644
> +--- a/tests/check/Makefile.am
> ++++ b/tests/check/Makefile.am
> +@@ -178,6 +178,23 @@ noinst_PROGRAMS =
> + 
> + TESTS = $(check_PROGRAMS)
> + 
> ++install-ptest: $(TESTS)
> ++	@$(INSTALL) -d $(DESTDIR)
> ++	@for dir in gst libs tools pipelines elements generic; do \
> ++		if [ -x $$dir/.libs ]; then \
> ++			$(INSTALL) -d $(DESTDIR)/$$dir; \
> ++			$(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \
> ++		fi \
> ++	done
> ++
> ++runtests:
> ++	@for b in $(TESTS); do \
> ++		if [ -x $$b ]; then \
> ++			$(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \
> ++			--log-file $$b.log --trs-file $$b.trs $$b; \
> ++		fi \
> ++	done
> ++
> + noinst_HEADERS = \
> + 	gst/capslist.h \
> + 	gst/struct_arm.h \
> +-- 
> +2.7.4
> +
> diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest b/meta/recipes-multimedia/gstreamer/files/run-ptest
> new file mode 100644
> index 0000000..473d0b6
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +make -k runtests
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> index c2df1f3..9371132 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> @@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
>  
>  DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
>  
> -inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
> +inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest
>  
>  # This way common/m4/introspection.m4 will come first
>  # (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
> @@ -18,9 +18,12 @@ SRC_URI_append = " \
>      file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
>      file://gtk-doc-tweaks.patch \
>      file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
> +    file://add-a-target-to-compile-tests.patch \
> +    file://run-ptest \
>  "
>  
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
> +                   "
>  
>  PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
>  PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
> @@ -59,3 +62,20 @@ do_configure[prefuncs] += "delete_pkg_m4_file"
>  do_compile_prepend() {
>          export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
>  }
> +
> +do_compile_ptest() {
> +        oe_runmake build-checks
> +}
> +
> +do_install_ptest() {
> +        install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
> +        install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
> +        sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
> +            -e 's|${DEBUG_PREFIX_MAP}||g' \
> +            -e 's:${HOSTTOOLS_DIR}/::g' \
> +            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
> +            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
> +            -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
> +            -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
> +            -i ${D}${PTEST_PATH}/Makefile
> +}
> 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] gstreamer: enable ptest support
  2018-02-28  2:51 ` [PATCH v2] " Anuj Mittal
  2018-03-14  2:41   ` Anuj Mittal
@ 2018-03-14 17:03   ` Burton, Ross
  2018-03-19 14:36     ` Anuj Mittal
  2018-03-19  6:49   ` [PATCH v3] " Anuj Mittal
  2 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2018-03-14 17:03 UTC (permalink / raw)
  To: Anuj Mittal; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]

On 28 February 2018 at 02:51, Anuj Mittal <anuj.mittal@intel.com> wrote:

> +diff --git a/Makefile.am b/Makefile.am
> +index de057c4..42e90fe 100644
> +--- a/Makefile.am
> ++++ b/Makefile.am
> +@@ -96,6 +96,9 @@ check-torture:
> +
> + build-checks:
> +       $(MAKE) -C tests/check build-checks
> ++
> ++install-ptest:
> ++      $(MAKE) -C tests/check DESTDIR=$(DESTDIR) $@
> + else
> + check-valgrind:
>
+       echo "'check' library not installed, skipping"
>

I'd say not to bother patching the top-level and instead call the right
makefile from do_install_ptest.

++install-ptest: $(TESTS)
> ++      @$(INSTALL) -d $(DESTDIR)
> ++      @for dir in gst libs tools pipelines elements generic; do \
> ++              if [ -x $$dir/.libs ]; then \
> ++                      $(INSTALL) -d $(DESTDIR)/$$dir; \
> ++                      $(INSTALL_PROGRAM) $$dir/.libs/*
> $(DESTDIR)/$$dir/; \
> ++              fi \
> ++      done
>

Can this do string functions on TESTS instead of hard-coding the list of
directories?

Ross

[-- Attachment #2: Type: text/html, Size: 1946 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3] gstreamer: enable ptest support
  2018-02-28  2:51 ` [PATCH v2] " Anuj Mittal
  2018-03-14  2:41   ` Anuj Mittal
  2018-03-14 17:03   ` Burton, Ross
@ 2018-03-19  6:49   ` Anuj Mittal
  2018-03-19 17:03     ` Burton, Ross
  2 siblings, 1 reply; 10+ messages in thread
From: Anuj Mittal @ 2018-03-19  6:49 UTC (permalink / raw)
  To: openembedded-core

Make sure that the tests are packaged and can be executed
when ptest is enabled. Also, remove build host specific references
from Makefile.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 .../files/add-a-target-to-compile-tests.patch      | 46 ++++++++++++++++++++++
 meta/recipes-multimedia/gstreamer/files/run-ptest  |  3 ++
 meta/recipes-multimedia/gstreamer/gstreamer1.0.inc | 25 +++++++++++-
 3 files changed, 72 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
 create mode 100644 meta/recipes-multimedia/gstreamer/files/run-ptest

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 0000000..c918bbe
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch
@@ -0,0 +1,46 @@
+From e69e5408f03a2f65045a418af6605653c06ec28b Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 27 Feb 2018 09:27:01 +0800
+Subject: [PATCH] add targets for test installation
+
+Targets to make sure tests can be installed and then run on
+the target.
+
+Upstream-Status: Inappropriate [specific to oe setup]
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ tests/check/Makefile.am | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
+index afc1591..fb5c1c9 100644
+--- a/tests/check/Makefile.am
++++ b/tests/check/Makefile.am
+@@ -175,6 +175,23 @@ noinst_PROGRAMS =
+ 
+ TESTS = $(check_PROGRAMS)
+ 
++install-ptest: $(TESTS)
++	@$(INSTALL) -d $(DESTDIR)
++	@for dir in `find -maxdepth 1 -type d`; do \
++		if [ -x $$dir/.libs ]; then \
++			$(INSTALL) -d $(DESTDIR)/$$dir; \
++			$(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \
++		fi \
++	done
++
++runtests:
++	@for b in $(TESTS); do \
++		if [ -x $$b ]; then \
++			$(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \
++			--log-file $$b.log --trs-file $$b.trs $$b; \
++		fi \
++	done
++
+ noinst_HEADERS = \
+ 	gst/capslist.h \
+ 	gst/struct_arm.h \
+-- 
+2.7.4
+
diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest b/meta/recipes-multimedia/gstreamer/files/run-ptest
new file mode 100644
index 0000000..473d0b6
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k runtests
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index c2df1f3..91f5067 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
 
 DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
 
-inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest
 
 # This way common/m4/introspection.m4 will come first
 # (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
@@ -18,9 +18,12 @@ SRC_URI_append = " \
     file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
     file://gtk-doc-tweaks.patch \
     file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \
+    file://add-a-target-to-compile-tests.patch \
+    file://run-ptest \
 "
 
-PACKAGECONFIG ??= ""
+PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
+                   "
 
 PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
 PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
@@ -59,3 +62,21 @@ do_configure[prefuncs] += "delete_pkg_m4_file"
 do_compile_prepend() {
         export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
 }
+
+do_compile_ptest() {
+        oe_runmake build-checks
+}
+
+do_install_ptest() {
+        oe_runmake -C tests/check DESTDIR=${D}${PTEST_PATH} install-ptest
+        install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
+        install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
+        sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
+            -e 's|${DEBUG_PREFIX_MAP}||g' \
+            -e 's:${HOSTTOOLS_DIR}/::g' \
+            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
+            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \
+            -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+            -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \
+            -i ${D}${PTEST_PATH}/Makefile
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v2] gstreamer: enable ptest support
  2018-03-14 17:03   ` Burton, Ross
@ 2018-03-19 14:36     ` Anuj Mittal
  0 siblings, 0 replies; 10+ messages in thread
From: Anuj Mittal @ 2018-03-19 14:36 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core

Hi Ross,

On 03/15/2018 01:03 AM, Burton, Ross wrote:
> On 28 February 2018 at 02:51, Anuj Mittal <anuj.mittal@intel.com
> <mailto:anuj.mittal@intel.com>> wrote:
> 
>     +diff --git a/Makefile.am b/Makefile.am
>     +index de057c4..42e90fe 100644
>     +--- a/Makefile.am
>     ++++ b/Makefile.am
>     +@@ -96,6 +96,9 @@ check-torture:
>     +
>     + build-checks:
>     +       $(MAKE) -C tests/check build-checks
>     ++
>     ++install-ptest:
>     ++      $(MAKE) -C tests/check DESTDIR=$(DESTDIR) $@
>     + else
>     + check-valgrind: 
> 
>     +       echo "'check' library not installed, skipping"
> 
>  
> I'd say not to bother patching the top-level and instead call the right
> makefile from do_install_ptest.

I have made this change in v3.

> 
>     ++install-ptest: $(TESTS)
>     ++      @$(INSTALL) -d $(DESTDIR)
>     ++      @for dir in gst libs tools pipelines elements generic; do \
>     ++              if [ -x $$dir/.libs ]; then \
>     ++                      $(INSTALL) -d $(DESTDIR)/$$dir; \
>     ++                      $(INSTALL_PROGRAM) $$dir/.libs/*
>     $(DESTDIR)/$$dir/; \
>     ++              fi \
>     ++      done
> 
> 
> Can this do string functions on TESTS instead of hard-coding the list of
> directories?

TESTS is a list of <dir_name>/<test_name> and wouldn't have been
appropriate to get just the directory names. I used find to get the
first level directories instead.

Thanks,

Anuj

> 
> Ross



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] gstreamer: enable ptest support
  2018-03-19  6:49   ` [PATCH v3] " Anuj Mittal
@ 2018-03-19 17:03     ` Burton, Ross
  2018-03-19 17:34       ` Burton, Ross
  0 siblings, 1 reply; 10+ messages in thread
From: Burton, Ross @ 2018-03-19 17:03 UTC (permalink / raw)
  To: Anuj Mittal; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 5779 bytes --]

You're missing a dependency on make in PN-ptest, but installing that
results in about 20% of the tests failing.  Should they all work?

Ross

On 19 March 2018 at 06:49, Anuj Mittal <anuj.mittal@intel.com> wrote:

> Make sure that the tests are packaged and can be executed
> when ptest is enabled. Also, remove build host specific references
> from Makefile.
>
> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> ---
>  .../files/add-a-target-to-compile-tests.patch      | 46
> ++++++++++++++++++++++
>  meta/recipes-multimedia/gstreamer/files/run-ptest  |  3 ++
>  meta/recipes-multimedia/gstreamer/gstreamer1.0.inc | 25 +++++++++++-
>  3 files changed, 72 insertions(+), 2 deletions(-)
>  create mode 100644 meta/recipes-multimedia/gstreamer/files/add-a-target-
> to-compile-tests.patch
>  create mode 100644 meta/recipes-multimedia/gstreamer/files/run-ptest
>
> 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 0000000..c918bbe
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-
> to-compile-tests.patch
> @@ -0,0 +1,46 @@
> +From e69e5408f03a2f65045a418af6605653c06ec28b Mon Sep 17 00:00:00 2001
> +From: Anuj Mittal <anuj.mittal@intel.com>
> +Date: Tue, 27 Feb 2018 09:27:01 +0800
> +Subject: [PATCH] add targets for test installation
> +
> +Targets to make sure tests can be installed and then run on
> +the target.
> +
> +Upstream-Status: Inappropriate [specific to oe setup]
> +
> +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> +---
> + tests/check/Makefile.am | 17 +++++++++++++++++
> + 1 file changed, 17 insertions(+)
> +
> +diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
> +index afc1591..fb5c1c9 100644
> +--- a/tests/check/Makefile.am
> ++++ b/tests/check/Makefile.am
> +@@ -175,6 +175,23 @@ noinst_PROGRAMS =
> +
> + TESTS = $(check_PROGRAMS)
> +
> ++install-ptest: $(TESTS)
> ++      @$(INSTALL) -d $(DESTDIR)
> ++      @for dir in `find -maxdepth 1 -type d`; do \
> ++              if [ -x $$dir/.libs ]; then \
> ++                      $(INSTALL) -d $(DESTDIR)/$$dir; \
> ++                      $(INSTALL_PROGRAM) $$dir/.libs/*
> $(DESTDIR)/$$dir/; \
> ++              fi \
> ++      done
> ++
> ++runtests:
> ++      @for b in $(TESTS); do \
> ++              if [ -x $$b ]; then \
> ++                      $(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver
> --test-name "$$b" \
> ++                      --log-file $$b.log --trs-file $$b.trs $$b; \
> ++              fi \
> ++      done
> ++
> + noinst_HEADERS = \
> +       gst/capslist.h \
> +       gst/struct_arm.h \
> +--
> +2.7.4
> +
> diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest
> b/meta/recipes-multimedia/gstreamer/files/run-ptest
> new file mode 100644
> index 0000000..473d0b6
> --- /dev/null
> +++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +
> +make -k runtests
> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> index c2df1f3..91f5067 100644
> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
> @@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
>
>  DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native
> flex-native"
>
> -inherit autotools pkgconfig gettext upstream-version-is-even
> gobject-introspection gtk-doc
> +inherit autotools pkgconfig gettext upstream-version-is-even
> gobject-introspection gtk-doc ptest
>
>  # This way common/m4/introspection.m4 will come first
>  # (it has a custom INTROSPECTION_INIT macro, and so must be used instead
> of our common introspection.m4 file)
> @@ -18,9 +18,12 @@ SRC_URI_append = " \
>      file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
> \
>      file://gtk-doc-tweaks.patch \
>      file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
> \
> +    file://add-a-target-to-compile-tests.patch \
> +    file://run-ptest \
>  "
>
> -PACKAGECONFIG ??= ""
> +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests',
> '', d)} \
> +                   "
>
>  PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
>  PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
> @@ -59,3 +62,21 @@ do_configure[prefuncs] += "delete_pkg_m4_file"
>  do_compile_prepend() {
>          export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.
> libs"
>  }
> +
> +do_compile_ptest() {
> +        oe_runmake build-checks
> +}
> +
> +do_install_ptest() {
> +        oe_runmake -C tests/check DESTDIR=${D}${PTEST_PATH} install-ptest
> +        install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
> +        install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
> +        sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
> +            -e 's|${DEBUG_PREFIX_MAP}||g' \
> +            -e 's:${HOSTTOOLS_DIR}/::g' \
> +            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
> +            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e
> 's/^Makefile:/_Makefile:/' \
> +            -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir =
> \(.*\)/top_srcdir = ./' \
> +            -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir =
> \(.*\)/top_builddir = ./' \
> +            -i ${D}${PTEST_PATH}/Makefile
> +}
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 7435 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3] gstreamer: enable ptest support
  2018-03-19 17:03     ` Burton, Ross
@ 2018-03-19 17:34       ` Burton, Ross
  0 siblings, 0 replies; 10+ messages in thread
From: Burton, Ross @ 2018-03-19 17:34 UTC (permalink / raw)
  To: Anuj Mittal; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 6990 bytes --]

So the problem is that the tests explicitly search the build tree for
plugins (as they're testing the built plugins, not the system ones).

This is easily solved by deleting bits from the makefile:

--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -8,11 +8,7 @@ REGISTRY_ENVIRONMENT = \
   GST_REGISTRY=$(CHECK_REGISTRY)
AM_TESTS_ENVIRONMENT += \
- GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"   \
- $(REGISTRY_ENVIRONMENT)                    \
-
GST_PLUGIN_SCANNER_1_0=$(top_builddir)/libs/gst/helpers/gst-plugin-scanner \
- GST_PLUGIN_SYSTEM_PATH_1_0=                    \
- GST_PLUGIN_PATH_1_0=$(top_builddir)/plugins
+ GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)"
plugindir = $(libdir)/gstreamer-@GST_API_VERSION@

However, now elements/fdsrc and elements/filesrc both fail, because they're
both trying to open configure.ac in the build tree.  Changing that to the
ptest Makefile should be sufficient.

Ross

On 19 March 2018 at 17:03, Burton, Ross <ross.burton@intel.com> wrote:

> You're missing a dependency on make in PN-ptest, but installing that
> results in about 20% of the tests failing.  Should they all work?
>
> Ross
>
> On 19 March 2018 at 06:49, Anuj Mittal <anuj.mittal@intel.com> wrote:
>
>> Make sure that the tests are packaged and can be executed
>> when ptest is enabled. Also, remove build host specific references
>> from Makefile.
>>
>> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
>> ---
>>  .../files/add-a-target-to-compile-tests.patch      | 46
>> ++++++++++++++++++++++
>>  meta/recipes-multimedia/gstreamer/files/run-ptest  |  3 ++
>>  meta/recipes-multimedia/gstreamer/gstreamer1.0.inc | 25 +++++++++++-
>>  3 files changed, 72 insertions(+), 2 deletions(-)
>>  create mode 100644 meta/recipes-multimedia/gstrea
>> mer/files/add-a-target-to-compile-tests.patch
>>  create mode 100644 meta/recipes-multimedia/gstreamer/files/run-ptest
>>
>> 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 0000000..c918bbe
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/files/add-a-target-to-
>> compile-tests.patch
>> @@ -0,0 +1,46 @@
>> +From e69e5408f03a2f65045a418af6605653c06ec28b Mon Sep 17 00:00:00 2001
>> +From: Anuj Mittal <anuj.mittal@intel.com>
>> +Date: Tue, 27 Feb 2018 09:27:01 +0800
>> +Subject: [PATCH] add targets for test installation
>> +
>> +Targets to make sure tests can be installed and then run on
>> +the target.
>> +
>> +Upstream-Status: Inappropriate [specific to oe setup]
>> +
>> +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
>> +---
>> + tests/check/Makefile.am | 17 +++++++++++++++++
>> + 1 file changed, 17 insertions(+)
>> +
>> +diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
>> +index afc1591..fb5c1c9 100644
>> +--- a/tests/check/Makefile.am
>> ++++ b/tests/check/Makefile.am
>> +@@ -175,6 +175,23 @@ noinst_PROGRAMS =
>> +
>> + TESTS = $(check_PROGRAMS)
>> +
>> ++install-ptest: $(TESTS)
>> ++      @$(INSTALL) -d $(DESTDIR)
>> ++      @for dir in `find -maxdepth 1 -type d`; do \
>> ++              if [ -x $$dir/.libs ]; then \
>> ++                      $(INSTALL) -d $(DESTDIR)/$$dir; \
>> ++                      $(INSTALL_PROGRAM) $$dir/.libs/*
>> $(DESTDIR)/$$dir/; \
>> ++              fi \
>> ++      done
>> ++
>> ++runtests:
>> ++      @for b in $(TESTS); do \
>> ++              if [ -x $$b ]; then \
>> ++                      $(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver
>> --test-name "$$b" \
>> ++                      --log-file $$b.log --trs-file $$b.trs $$b; \
>> ++              fi \
>> ++      done
>> ++
>> + noinst_HEADERS = \
>> +       gst/capslist.h \
>> +       gst/struct_arm.h \
>> +--
>> +2.7.4
>> +
>> diff --git a/meta/recipes-multimedia/gstreamer/files/run-ptest
>> b/meta/recipes-multimedia/gstreamer/files/run-ptest
>> new file mode 100644
>> index 0000000..473d0b6
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/gstreamer/files/run-ptest
>> @@ -0,0 +1,3 @@
>> +#!/bin/sh
>> +
>> +make -k runtests
>> diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
>> b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
>> index c2df1f3..91f5067 100644
>> --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
>> +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
>> @@ -8,7 +8,7 @@ LICENSE = "LGPLv2+"
>>
>>  DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native
>> flex-native"
>>
>> -inherit autotools pkgconfig gettext upstream-version-is-even
>> gobject-introspection gtk-doc
>> +inherit autotools pkgconfig gettext upstream-version-is-even
>> gobject-introspection gtk-doc ptest
>>
>>  # This way common/m4/introspection.m4 will come first
>>  # (it has a custom INTROSPECTION_INIT macro, and so must be used instead
>> of our common introspection.m4 file)
>> @@ -18,9 +18,12 @@ SRC_URI_append = " \
>>      file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
>> \
>>      file://gtk-doc-tweaks.patch \
>>      file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch
>> \
>> +    file://add-a-target-to-compile-tests.patch \
>> +    file://run-ptest \
>>  "
>>
>> -PACKAGECONFIG ??= ""
>> +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests',
>> '', d)} \
>> +                   "
>>
>>  PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
>>  PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
>> @@ -59,3 +62,21 @@ do_configure[prefuncs] += "delete_pkg_m4_file"
>>  do_compile_prepend() {
>>          export GIR_EXTRA_LIBS_PATH="${B}/gst/
>> .libs:${B}/libs/gst/base/.libs"
>>  }
>> +
>> +do_compile_ptest() {
>> +        oe_runmake build-checks
>> +}
>> +
>> +do_install_ptest() {
>> +        oe_runmake -C tests/check DESTDIR=${D}${PTEST_PATH} install-ptest
>> +        install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH}
>> +        install -m 755 ${S}/test-driver ${D}${PTEST_PATH}
>> +        sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
>> +            -e 's|${DEBUG_PREFIX_MAP}||g' \
>> +            -e 's:${HOSTTOOLS_DIR}/::g' \
>> +            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
>> +            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e
>> 's/^Makefile:/_Makefile:/' \
>> +            -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir =
>> \(.*\)/top_srcdir = ./' \
>> +            -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir
>> = \(.*\)/top_builddir = ./' \
>> +            -i ${D}${PTEST_PATH}/Makefile
>> +}
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>
>

[-- Attachment #2: Type: text/html, Size: 9103 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-19 17:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27  8:56 [PATCH] gstreamer: enable ptest support Anuj Mittal
2018-02-27  9:38 ` Otavio Salvador
2018-02-27  9:42   ` Anuj Mittal
2018-02-28  2:51 ` [PATCH v2] " Anuj Mittal
2018-03-14  2:41   ` Anuj Mittal
2018-03-14 17:03   ` Burton, Ross
2018-03-19 14:36     ` Anuj Mittal
2018-03-19  6:49   ` [PATCH v3] " Anuj Mittal
2018-03-19 17:03     ` Burton, Ross
2018-03-19 17:34       ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.