diff options
| author | Changqing Li <changqing.li@windriver.com> | 2019-04-24 11:37:04 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-29 14:16:30 +0100 |
| commit | 7f46ac8b5e87ed16e92a6e498831b0838540de53 (patch) | |
| tree | 645662b3f8e73c0bed69c3c7b102b6400b3205e1 /meta/recipes-core/gettext | |
| parent | 37af0d00f0e920d7fc30c6c0ceeb8e753b5a854e (diff) | |
| download | poky-7f46ac8b5e87ed16e92a6e498831b0838540de53.tar.gz | |
gettext: add ptest support
skip test lang-c since it need gcc/libtool on target
(From OE-Core rev: 892e6258f737b0903fef29daef99f31f616e217f)
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/gettext')
3 files changed, 120 insertions, 1 deletions
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest b/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest new file mode 100644 index 0000000000..f17f3c87a7 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.19.8.1/run-ptest | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | #This script is used to run gettext test suites | ||
| 4 | cd tests | ||
| 5 | |||
| 6 | make -k runtest-TESTS top_srcdir=.. srcdir=. abs_srcdir=$PWD top_builddir=$PWD/../ abs_top_srcdir=$PWD/../ | cat | ||
diff --git a/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch b/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch new file mode 100644 index 0000000000..31ff9138a9 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.19.8.1/serial-tests-config.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | From c4b1f3a0c7b7c40b343be9b95deb84e0485643be Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Hongjun.Yang" <hongjun.yang@windriver.com> | ||
| 3 | Date: Thu, 28 Jul 2016 12:36:15 +0800 | ||
| 4 | Subject: [PATCH] fix for ptest | ||
| 5 | |||
| 6 | Add serial-tests support, ptest need it | ||
| 7 | |||
| 8 | Upstream-Status: Inappropriate [oe specific] | ||
| 9 | |||
| 10 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
| 11 | --- | ||
| 12 | configure.ac | 2 +- | ||
| 13 | gettext-runtime/configure.ac | 2 +- | ||
| 14 | gettext-tools/configure.ac | 2 +- | ||
| 15 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/configure.ac b/configure.ac | ||
| 18 | index 5e996fa..880581f 100644 | ||
| 19 | --- a/configure.ac | ||
| 20 | +++ b/configure.ac | ||
| 21 | @@ -23,7 +23,7 @@ AC_INIT([gettext], | ||
| 22 | [bug-gnu-gettext@gnu.org]) | ||
| 23 | AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) | ||
| 24 | AC_CONFIG_AUX_DIR([build-aux]) | ||
| 25 | -AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests dist-xz dist-lzip]) | ||
| 26 | +AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests dist-xz dist-lzip]) | ||
| 27 | |||
| 28 | dnl Override automake's tar command used for creating distributions. | ||
| 29 | am__tar='${AMTAR} chof - --owner=root --group=root "$$tardir"' | ||
| 30 | diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac | ||
| 31 | index e9299b6..d4f5528 100644 | ||
| 32 | --- a/gettext-runtime/configure.ac | ||
| 33 | +++ b/gettext-runtime/configure.ac | ||
| 34 | @@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], | ||
| 35 | [bug-gnu-gettext@gnu.org]) | ||
| 36 | AC_CONFIG_SRCDIR([intl/dcigettext.c]) | ||
| 37 | AC_CONFIG_AUX_DIR([../build-aux]) | ||
| 38 | -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) | ||
| 39 | +AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) | ||
| 40 | AC_CONFIG_HEADERS([config.h]) | ||
| 41 | |||
| 42 | dnl Installation directories. | ||
| 43 | diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac | ||
| 44 | index 920eeb6..c507434 100644 | ||
| 45 | --- a/gettext-tools/configure.ac | ||
| 46 | +++ b/gettext-tools/configure.ac | ||
| 47 | @@ -22,7 +22,7 @@ AC_INIT([gettext-tools], | ||
| 48 | [bug-gnu-gettext@gnu.org]) | ||
| 49 | AC_CONFIG_SRCDIR([src/msgfmt.c]) | ||
| 50 | AC_CONFIG_AUX_DIR([../build-aux]) | ||
| 51 | -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) | ||
| 52 | +AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) | ||
| 53 | AC_CONFIG_HEADERS([config.h]) | ||
| 54 | |||
| 55 | dnl Installation directories. | ||
| 56 | -- | ||
| 57 | 2.1.4 | ||
| 58 | |||
diff --git a/meta/recipes-core/gettext/gettext_0.19.8.1.bb b/meta/recipes-core/gettext/gettext_0.19.8.1.bb index 404972439b..627568bc3f 100644 --- a/meta/recipes-core/gettext/gettext_0.19.8.1.bb +++ b/meta/recipes-core/gettext/gettext_0.19.8.1.bb | |||
| @@ -22,12 +22,14 @@ SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \ | |||
| 22 | file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ | 22 | file://cr-statement.c-timsort.h-fix-formatting-issues.patch \ |
| 23 | file://use-pkgconfig.patch \ | 23 | file://use-pkgconfig.patch \ |
| 24 | file://fix-CVE-2018-18751.patch \ | 24 | file://fix-CVE-2018-18751.patch \ |
| 25 | file://run-ptest \ | ||
| 26 | file://serial-tests-config.patch \ | ||
| 25 | " | 27 | " |
| 26 | 28 | ||
| 27 | SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" | 29 | SRC_URI[md5sum] = "97e034cf8ce5ba73a28ff6c3c0638092" |
| 28 | SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43" | 30 | SRC_URI[sha256sum] = "ff942af0e438ced4a8b0ea4b0b6e0d6d657157c5e2364de57baa279c1c125c43" |
| 29 | 31 | ||
| 30 | inherit autotools texinfo pkgconfig | 32 | inherit autotools texinfo pkgconfig ptest |
| 31 | 33 | ||
| 32 | EXTRA_OECONF += "--without-lispdir \ | 34 | EXTRA_OECONF += "--without-lispdir \ |
| 33 | --disable-csharp \ | 35 | --disable-csharp \ |
| @@ -129,4 +131,57 @@ do_install_append_class-native () { | |||
| 129 | 131 | ||
| 130 | } | 132 | } |
| 131 | 133 | ||
| 134 | do_compile_ptest() { | ||
| 135 | cd ${B}/gettext-tools/tests/ | ||
| 136 | sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_PROGRAMS)' Makefile | ||
| 137 | oe_runmake buildtest-TESTS | ||
| 138 | cd - | ||
| 139 | } | ||
| 140 | |||
| 141 | do_install_ptest() { | ||
| 142 | if [ ${PTEST_ENABLED} = "1" ]; then | ||
| 143 | mkdir -p ${D}${PTEST_PATH}/tests | ||
| 144 | mkdir -p ${D}${PTEST_PATH}/src | ||
| 145 | mkdir -p ${D}${PTEST_PATH}/po | ||
| 146 | mkdir -p ${D}${PTEST_PATH}/misc | ||
| 147 | cp -rf ${S}/gettext-tools/tests/* ${D}${PTEST_PATH}/tests | ||
| 148 | cp -rf ${B}/gettext-tools/tests/.libs/* ${D}${PTEST_PATH}/tests | ||
| 149 | cp -rf ${B}/gettext-runtime/intl/.libs/libgnuintl.so.8* ${D}${libdir}/ | ||
| 150 | cp -rf ${B}/gettext-tools/tests/Makefile ${D}${PTEST_PATH}/tests | ||
| 151 | sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile | ||
| 152 | sed -i -e 's:CONFIG_SHELL=.*:& LOCALE_FR='fr_FR.iso88591' LOCALE_FR_UTF8='fr_FR.utf8' LOCALE_JA='ja_JP.eucjp':g' \ | ||
| 153 | -e 's:lang-c lang-c++:lang-c++:g' ${D}${PTEST_PATH}/tests/Makefile | ||
| 154 | install ${S}/gettext-tools/src/msgunfmt.tcl ${D}${PTEST_PATH}/src | ||
| 155 | install ${S}/gettext-tools/src/project-id ${D}${PTEST_PATH}/src | ||
| 156 | install ${B}/gettext-runtime/src/gettext.sh ${D}${PTEST_PATH}/src | ||
| 157 | install ${B}/gettext-runtime/src/ngettext ${D}${PTEST_PATH}/src | ||
| 158 | install ${B}/gettext-runtime/src/envsubst ${D}${PTEST_PATH}/src | ||
| 159 | install ${B}/gettext-runtime/src/gettext ${D}${PTEST_PATH}/src | ||
| 160 | install ${B}/gettext-tools/src/.libs/cldr-plurals ${D}${PTEST_PATH}/src | ||
| 161 | install ${S}/gettext-tools/po/gettext-tools.pot ${D}${PTEST_PATH}/po | ||
| 162 | install ${B}/gettext-tools/misc/* ${D}${PTEST_PATH}/misc | ||
| 163 | find ${D}${PTEST_PATH}/ -name "*.o" -exec rm {} \; | ||
| 164 | chmod 0755 ${D}${PTEST_PATH}/tests/lang-vala ${D}${PTEST_PATH}/tests/plural-1 ${D}${PTEST_PATH}/tests/xgettext-tcl-4 \ | ||
| 165 | ${D}${PTEST_PATH}/tests/xgettext-vala-1 ${D}${PTEST_PATH}/tests/xgettext-po-2 | ||
| 166 | fi | ||
| 167 | } | ||
| 168 | |||
| 169 | RDEPENDS_${PN}-ptest_append_libc-glibc = "\ | ||
| 170 | glibc-gconv-big5 \ | ||
| 171 | glibc-charmap-big5 \ | ||
| 172 | glibc-gconv-cp1251 \ | ||
| 173 | glibc-charmap-cp1251 \ | ||
| 174 | glibc-charmap-iso-8859-9 \ | ||
| 175 | glibc-gconv-iso8859-9 \ | ||
| 176 | glibc-charmap-koi8-r \ | ||
| 177 | glibc-gconv-koi8-r \ | ||
| 178 | glibc-gconv-iso8859-2 \ | ||
| 179 | glibc-charmap-iso-8859-2 \ | ||
| 180 | glibc-gconv-euc-kr \ | ||
| 181 | glibc-charmap-euc-kr \ | ||
| 182 | " | ||
| 183 | |||
| 184 | INSANE_SKIP_${PN}-ptest += "ldflags" | ||
| 185 | INSANE_SKIP_${PN}-ptest += "rpaths" | ||
| 186 | |||
| 132 | BBCLASSEXTEND = "native nativesdk" | 187 | BBCLASSEXTEND = "native nativesdk" |
