summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb25
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc7
4 files changed, 91 insertions, 5 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
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
index 966a851f76..9854585ca5 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.34.3.bb
@@ -12,6 +12,8 @@ SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]
12SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ 12SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
13 file://configure-libtool.patch \ 13 file://configure-libtool.patch \
14 file://glib-2.0_fix_for_x32.patch \ 14 file://glib-2.0_fix_for_x32.patch \
15 file://Makefile-ptest.patch \
16 file://run-ptest \
15 " 17 "
16SRC_URI[md5sum] = "a4ca31e258273c3761e3de2edd607661" 18SRC_URI[md5sum] = "a4ca31e258273c3761e3de2edd607661"
17SRC_URI[sha256sum] = "855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7" 19SRC_URI[sha256sum] = "855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7"
@@ -19,6 +21,24 @@ SRC_URI[sha256sum] = "855fcbf87cb93065b488358e351774d8a39177281023bae58c286f4161
19SRC_URI_append_class-native = " file://glib-gettextize-dir.patch" 21SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
20BBCLASSEXTEND = "native nativesdk" 22BBCLASSEXTEND = "native nativesdk"
21 23
24RDEPENDS_${PN}-ptest += "\
25 eglibc-gconv-utf-16 \
26 eglibc-charmap-utf-8 \
27 eglibc-gconv-cp1255 \
28 eglibc-charmap-cp1255 \
29 eglibc-gconv-utf-32 \
30 eglibc-gconv-utf-7 \
31 eglibc-charmap-invariant \
32 eglibc-localedata-translit-cjk-variants \
33 tzdata \
34 tzdata-americas \
35 tzdata-asia \
36 tzdata-europe \
37 tzdata-posix \
38 python-pygobject \
39 python-dbus \
40 "
41
22do_configure_prepend() { 42do_configure_prepend() {
23 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in 43 sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
24} 44}
@@ -28,12 +48,13 @@ do_install_append() {
28 rm -f ${D}${libdir}/gdbus-2.0/codegen/*.pyc 48 rm -f ${D}${libdir}/gdbus-2.0/codegen/*.pyc
29 rm -f ${D}${libdir}/gdbus-2.0/codegen/*.pyo 49 rm -f ${D}${libdir}/gdbus-2.0/codegen/*.pyo
30 # and empty dirs 50 # and empty dirs
31 rmdir ${D}${libdir}/gio/modules/ 51 rm -rf ${D}${libdir}/gio
32 rmdir ${D}${libdir}/gio/
33 52
34 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location 53 # Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
35 # for target as /usr/bin/perl, so fix it to /usr/bin/perl. 54 # for target as /usr/bin/perl, so fix it to /usr/bin/perl.
36 if [ -f ${D}${bindir}/glib-mkenums ]; then 55 if [ -f ${D}${bindir}/glib-mkenums ]; then
37 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums 56 sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
38 fi 57 fi
58
59 ptest_do_install
39} 60}
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index bc831e6d99..53b20b6188 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -21,13 +21,14 @@ PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
21LEAD_SONAME = "libglib-2.0.*" 21LEAD_SONAME = "libglib-2.0.*"
22FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext" 22FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
23 23
24inherit autotools gettext gtk-doc pkgconfig 24inherit autotools gettext gtk-doc pkgconfig ptest
25 25
26S = "${WORKDIR}/glib-${PV}" 26S = "${WORKDIR}/glib-${PV}"
27 27
28CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-modular-tests" 28CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap"
29 29
30EXTRA_OECONF = "--enable-included-printf=no ${CORECONF}" 30PTEST_CONF = "${@base_contains('DISTRO_FEATURES', 'ptest', '', '--disable-modular-tests', d)}"
31EXTRA_OECONF = "--enable-included-printf=no ${CORECONF} ${PTEST_CONF}"
31EXTRA_OECONF_class-native = "${CORECONF}" 32EXTRA_OECONF_class-native = "${CORECONF}"
32EXTRA_OECONF_linuxstdbase = "--enable-included-printf=no ${CORECONF}" 33EXTRA_OECONF_linuxstdbase = "--enable-included-printf=no ${CORECONF}"
33 34