summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0
diff options
context:
space:
mode:
authorBjörn Stenberg <bjst@enea.com>2012-12-19 17:18:29 +0100
committerSaul Wold <sgw@linux.intel.com>2012-12-25 14:00:20 -0800
commitdec6f912d68f52748f645b6af411f189cf464f85 (patch)
tree65f63f1a17ec98d828808f42341b07eb29a40c67 /meta/recipes-core/glib-2.0/glib-2.0
parentda25002a0968c12f16719f9fed21c76b9321aeb5 (diff)
downloadopenembedded-core-dec6f912d68f52748f645b6af411f189cf464f85.tar.gz
Add ptest for glib.
Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch61
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/run-ptest3
2 files changed, 64 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
new file mode 100644
index 0000000000..cb36c09bce
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
@@ -0,0 +1,61 @@
+Add 'ptest' target to Makefile, to run tests without checking dependencies.
+Add 'install-ptest' target, to copy needed files to ptest dir.
+
+Signed-off-by: Björn Stenberg <bjst@enea.com>
+Upstream-status: Pending
+---
+ Makefile.decl | 43 +++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 43 insertions(+)
+
+--- a/Makefile.decl 2012-03-12 01:42:39.000000000 +0100
++++ b/Makefile.decl 2012-11-26 13:42:08.436865192 +0100
+@@ -25,6 +25,49 @@
+ test-nonrecursive:
+ endif
+
++ptest: ptest-nonrecursive
++ @ for subdir in $(SUBDIRS) .; do \
++ test -d "$$subdir" -a "$$subdir" != "." -a "$$subdir" != "po" && \
++ ( test -d $$subdir && cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) \
++ done
++
++ptest-nonrecursive:
++ @test -z "${TEST_PROGS}" || ${GTESTER} --keep-going --verbose ${TEST_PROGS}
++
++install-ptest: install-ptest-nonrecursive
++ @test -z "$(SUBDIRS)" || for subdir in $(SUBDIRS); do \
++ test "$$subdir" == "." || \
++ (cd $$subdir && $(MAKE) DESTDIR=$(DESTDIR)/$$subdir $@ ) \
++ done
++
++# install files used for ptest:
++# - copy EXTRA_DIST (for test data in glib/tests)
++# - run dist-hook (for glib/tests/bookmarks/ and glib/tests/markups)
++# - copy TEST_PROGS (the test programs)
++# - copy INSTALL_PROGS (for glib/gtester)
++# - avoid libtool wrappers by copying binaries from .libs
++# - strip Makefile: target from all Makefiles
++install-ptest-nonrecursive:
++ @mkdir -p $(DESTDIR)
++ @if [ -n "${TEST_PROGS}" ]; then \
++ if [ -n "${EXTRA_DIST}" ]; then \
++ cp ${EXTRA_DIST} $(DESTDIR); \
++ fi; \
++ grep -q dist-hook: Makefile && \
++ $(MAKE) distdir=$(DESTDIR) dist-hook; \
++ if [ -d .libs ] ; then \
++ cd .libs; \
++ fi; \
++ cp ${TEST_PROGS} $(DESTDIR); \
++ fi;
++ @if [ -n "${INSTALL_PROGS}" ]; then \
++ if [ -d .libs ] ; then \
++ cd .libs; \
++ fi; \
++ cp ${INSTALL_PROGS} $(DESTDIR); \
++ fi
++ @test -f Makefile && sed 's/^Makefile:/_Makefile:/' <Makefile >$(DESTDIR)/Makefile
++
+ # test-report: run tests in subdirs and generate report
+ # perf-report: run tests in subdirs with -m perf and generate report
+ # full-report: like test-report: with -m perf and -m slow
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
new file mode 100644
index 0000000000..3deb586999
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+make -k ptest