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
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-26 11:34:05 +0000
commitddce381e78c92e0881c73f21d97af0264b3d47e0 (patch)
tree69bd1c36720d77bf9c3b51879859b836658e1894 /meta/recipes-core/glib-2.0/glib-2.0
parentdaad0d8dda05546385186086e57cf18388a3b90b (diff)
downloadpoky-ddce381e78c92e0881c73f21d97af0264b3d47e0.tar.gz
Add ptest for glib.
(From OE-Core rev: dec6f912d68f52748f645b6af411f189cf464f85) Signed-off-by: Björn Stenberg <bjst@enea.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@
1Add 'ptest' target to Makefile, to run tests without checking dependencies.
2Add 'install-ptest' target, to copy needed files to ptest dir.
3
4Signed-off-by: Björn Stenberg <bjst@enea.com>
5Upstream-status: Pending
6---
7 Makefile.decl | 43 +++++++++++++++++++++++++++++++++++++++++++
8 1 file changed, 43 insertions(+)
9
10--- a/Makefile.decl 2012-03-12 01:42:39.000000000 +0100
11+++ b/Makefile.decl 2012-11-26 13:42:08.436865192 +0100
12@@ -25,6 +25,49 @@
13 test-nonrecursive:
14 endif
15
16+ptest: ptest-nonrecursive
17+ @ for subdir in $(SUBDIRS) .; do \
18+ test -d "$$subdir" -a "$$subdir" != "." -a "$$subdir" != "po" && \
19+ ( test -d $$subdir && cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) \
20+ done
21+
22+ptest-nonrecursive:
23+ @test -z "${TEST_PROGS}" || ${GTESTER} --keep-going --verbose ${TEST_PROGS}
24+
25+install-ptest: install-ptest-nonrecursive
26+ @test -z "$(SUBDIRS)" || for subdir in $(SUBDIRS); do \
27+ test "$$subdir" == "." || \
28+ (cd $$subdir && $(MAKE) DESTDIR=$(DESTDIR)/$$subdir $@ ) \
29+ done
30+
31+# install files used for ptest:
32+# - copy EXTRA_DIST (for test data in glib/tests)
33+# - run dist-hook (for glib/tests/bookmarks/ and glib/tests/markups)
34+# - copy TEST_PROGS (the test programs)
35+# - copy INSTALL_PROGS (for glib/gtester)
36+# - avoid libtool wrappers by copying binaries from .libs
37+# - strip Makefile: target from all Makefiles
38+install-ptest-nonrecursive:
39+ @mkdir -p $(DESTDIR)
40+ @if [ -n "${TEST_PROGS}" ]; then \
41+ if [ -n "${EXTRA_DIST}" ]; then \
42+ cp ${EXTRA_DIST} $(DESTDIR); \
43+ fi; \
44+ grep -q dist-hook: Makefile && \
45+ $(MAKE) distdir=$(DESTDIR) dist-hook; \
46+ if [ -d .libs ] ; then \
47+ cd .libs; \
48+ fi; \
49+ cp ${TEST_PROGS} $(DESTDIR); \
50+ fi;
51+ @if [ -n "${INSTALL_PROGS}" ]; then \
52+ if [ -d .libs ] ; then \
53+ cd .libs; \
54+ fi; \
55+ cp ${INSTALL_PROGS} $(DESTDIR); \
56+ fi
57+ @test -f Makefile && sed 's/^Makefile:/_Makefile:/' <Makefile >$(DESTDIR)/Makefile
58+
59 # test-report: run tests in subdirs and generate report
60 # perf-report: run tests in subdirs with -m perf and generate report
61 # 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 @@
1#!/bin/sh
2
3make -k ptest