summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch')
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0/Makefile-ptest.patch61
1 files changed, 61 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..40c5b9fdb1
--- /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