summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2025-08-21 22:17:24 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-25 17:47:21 +0100
commit1854cd6d37ddfbd8bc0915514b25b0829f86a548 (patch)
tree146c1e4cf329cd1ee17c0df9a7fd33ab0232a7de
parent02bf521a239435fb5af3deb9728a807a1201be4e (diff)
downloadpoky-1854cd6d37ddfbd8bc0915514b25b0829f86a548.tar.gz
gettext: Skip test known to fail on musl
* Use posix thread on musl and cache * Force using system posix complaint printf * Add coreutils to ptest dependencies (From OE-Core rev: 16b1fff0dc3f95d2f52106b0133133d175725d52) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/gettext/gettext/0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch87
-rw-r--r--meta/recipes-core/gettext/gettext_0.23.1.bb7
2 files changed, 93 insertions, 1 deletions
diff --git a/meta/recipes-core/gettext/gettext/0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch b/meta/recipes-core/gettext/gettext/0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch
new file mode 100644
index 0000000000..13ef27e523
--- /dev/null
+++ b/meta/recipes-core/gettext/gettext/0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch
@@ -0,0 +1,87 @@
1From 7ccf6e62ce1e7ae86a7f760eb0520e993d508b5b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 21 Aug 2025 13:24:47 -0700
4Subject: [PATCH] Ignore failing tests needing BIG5 encoding on musl
5
6This test fails on Linux with musl libc
7which does not support the BIG5 encoding in 'iconv'.
8
9Upstream-Status: Inappropriate [Musl-specific]
10
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 gettext-tools/tests/msgcat-22 | 2 ++
14 gettext-tools/tests/msgconv-2 | 2 ++
15 gettext-tools/tests/msgconv-8 | 2 ++
16 gettext-tools/tests/msgmerge-compendium-6 | 2 ++
17 gettext-tools/tests/xgettext-python-3 | 2 ++
18 5 files changed, 10 insertions(+)
19
20diff --git a/gettext-tools/tests/msgcat-22 b/gettext-tools/tests/msgcat-22
21index 604718811ec9..abe58778cdf5 100755
22--- a/gettext-tools/tests/msgcat-22
23+++ b/gettext-tools/tests/msgcat-22
24@@ -6,6 +6,8 @@
25 # Note: This test fails on Linux with musl libc versions that don't support
26 # the GB18030 encoding in 'iconv'.
27
28+exit 77
29+
30 cat <<\EOF > mcat-test22.po
31 msgid ""
32 msgstr ""
33diff --git a/gettext-tools/tests/msgconv-2 b/gettext-tools/tests/msgconv-2
34index d286cdae5723..b02e1be1dc5e 100755
35--- a/gettext-tools/tests/msgconv-2
36+++ b/gettext-tools/tests/msgconv-2
37@@ -7,6 +7,8 @@
38 # Note: This test fails on Linux with musl libc versions that don't support
39 # the BIG5 encoding in 'iconv'.
40
41+exit 77
42+
43 cat <<\EOF > mco-test2.po
44 # Chinese translation for GNU gettext messages.
45 #
46diff --git a/gettext-tools/tests/msgconv-8 b/gettext-tools/tests/msgconv-8
47index 207b0f01e7c5..618de0f581b1 100755
48--- a/gettext-tools/tests/msgconv-8
49+++ b/gettext-tools/tests/msgconv-8
50@@ -6,6 +6,8 @@
51 # Note: This test fails on Linux with musl libc versions that don't support
52 # the GB18030 encoding in 'iconv'.
53
54+exit 77
55+
56 cat <<\EOF > mco-test8.po
57 msgid ""
58 msgstr ""
59diff --git a/gettext-tools/tests/msgmerge-compendium-6 b/gettext-tools/tests/msgmerge-compendium-6
60index 59eb00e04be2..d1d7f0d18cdf 100755
61--- a/gettext-tools/tests/msgmerge-compendium-6
62+++ b/gettext-tools/tests/msgmerge-compendium-6
63@@ -10,6 +10,8 @@
64 # Note: This test fails on Linux with musl libc versions and on Solaris 11
65 # (OpenIndiana, OmniOS) that don't support the EUC-KR encoding in 'iconv'.
66
67+exit 77
68+
69 : ${MSGCONV=msgconv}
70 ${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot "$wabs_srcdir"/mm-ko.ascii.pot
71
72diff --git a/gettext-tools/tests/xgettext-python-3 b/gettext-tools/tests/xgettext-python-3
73index 1e13b5793557..ee1ffee420fe 100755
74--- a/gettext-tools/tests/xgettext-python-3
75+++ b/gettext-tools/tests/xgettext-python-3
76@@ -6,6 +6,8 @@
77 # Note: This test fails on Linux with musl libc versions that don't support
78 # the EUC-JP encoding in 'iconv'.
79
80+exit 77
81+
82 cat <<\EOF > xg-py-3a.py
83 #!/usr/bin/env python
84 # TRANSLATORS: Franois Pinard is a hero.
85--
862.39.5
87
diff --git a/meta/recipes-core/gettext/gettext_0.23.1.bb b/meta/recipes-core/gettext/gettext_0.23.1.bb
index c704a3b6d7..e160d4839d 100644
--- a/meta/recipes-core/gettext/gettext_0.23.1.bb
+++ b/meta/recipes-core/gettext/gettext_0.23.1.bb
@@ -27,6 +27,7 @@ SRC_URI += " \
27 file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ 27 file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \
28 file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \ 28 file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \
29 " 29 "
30SRC_URI:append:libc-musl = " file://0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch"
30 31
31inherit autotools texinfo pkgconfig ptest 32inherit autotools texinfo pkgconfig ptest
32 33
@@ -51,6 +52,10 @@ EXTRA_OECONF:append:class-target = " \
51 gt_cv_locale_de=de_DE.ISO-8859-1 \ 52 gt_cv_locale_de=de_DE.ISO-8859-1 \
52" 53"
53 54
55EXTRA_OECONF:append:libc-musl = "\
56 --enable-threads=posix \
57 gt_cv_func_printf_posix=yes \
58"
54PACKAGECONFIG ??= "glib libxml" 59PACKAGECONFIG ??= "glib libxml"
55PACKAGECONFIG:class-native = "" 60PACKAGECONFIG:class-native = ""
56PACKAGECONFIG:class-nativesdk = "" 61PACKAGECONFIG:class-nativesdk = ""
@@ -174,7 +179,7 @@ do_install_ptest() {
174 sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env 179 sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env
175} 180}
176 181
177RDEPENDS:${PN}-ptest += "make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr" 182RDEPENDS:${PN}-ptest += "coreutils make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr"
178RDEPENDS:${PN}-ptest:append:libc-glibc = "\ 183RDEPENDS:${PN}-ptest:append:libc-glibc = "\
179 glibc-gconv-big5 \ 184 glibc-gconv-big5 \
180 glibc-charmap-big5 \ 185 glibc-charmap-big5 \