]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
gettext: Skip test known to fail on musl
authorKhem Raj <raj.khem@gmail.com>
Fri, 22 Aug 2025 05:17:24 +0000 (22:17 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Aug 2025 16:46:38 +0000 (17:46 +0100)
* Use posix thread on musl and cache
* Force using system posix complaint printf
* Add coreutils to ptest dependencies

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-core/gettext/gettext/0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch [new file with mode: 0644]
meta/recipes-core/gettext/gettext_0.23.1.bb

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 (file)
index 0000000..13ef27e
--- /dev/null
@@ -0,0 +1,87 @@
+From 7ccf6e62ce1e7ae86a7f760eb0520e993d508b5b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 21 Aug 2025 13:24:47 -0700
+Subject: [PATCH] Ignore failing tests needing BIG5 encoding on musl
+
+This test fails on Linux with musl libc
+which does not support the BIG5 encoding in 'iconv'.
+
+Upstream-Status: Inappropriate [Musl-specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gettext-tools/tests/msgcat-22             | 2 ++
+ gettext-tools/tests/msgconv-2             | 2 ++
+ gettext-tools/tests/msgconv-8             | 2 ++
+ gettext-tools/tests/msgmerge-compendium-6 | 2 ++
+ gettext-tools/tests/xgettext-python-3     | 2 ++
+ 5 files changed, 10 insertions(+)
+
+diff --git a/gettext-tools/tests/msgcat-22 b/gettext-tools/tests/msgcat-22
+index 604718811ec9..abe58778cdf5 100755
+--- a/gettext-tools/tests/msgcat-22
++++ b/gettext-tools/tests/msgcat-22
+@@ -6,6 +6,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the GB18030 encoding in 'iconv'.
++exit 77
++
+ cat <<\EOF > mcat-test22.po
+ msgid ""
+ msgstr ""
+diff --git a/gettext-tools/tests/msgconv-2 b/gettext-tools/tests/msgconv-2
+index d286cdae5723..b02e1be1dc5e 100755
+--- a/gettext-tools/tests/msgconv-2
++++ b/gettext-tools/tests/msgconv-2
+@@ -7,6 +7,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the BIG5 encoding in 'iconv'.
++exit 77
++
+ cat <<\EOF > mco-test2.po
+ # Chinese translation for GNU gettext messages.
+ #
+diff --git a/gettext-tools/tests/msgconv-8 b/gettext-tools/tests/msgconv-8
+index 207b0f01e7c5..618de0f581b1 100755
+--- a/gettext-tools/tests/msgconv-8
++++ b/gettext-tools/tests/msgconv-8
+@@ -6,6 +6,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the GB18030 encoding in 'iconv'.
++exit 77
++
+ cat <<\EOF > mco-test8.po
+ msgid ""
+ msgstr ""
+diff --git a/gettext-tools/tests/msgmerge-compendium-6 b/gettext-tools/tests/msgmerge-compendium-6
+index 59eb00e04be2..d1d7f0d18cdf 100755
+--- a/gettext-tools/tests/msgmerge-compendium-6
++++ b/gettext-tools/tests/msgmerge-compendium-6
+@@ -10,6 +10,8 @@
+ # Note: This test fails on Linux with musl libc versions and on Solaris 11
+ # (OpenIndiana, OmniOS) that don't support the EUC-KR encoding in 'iconv'.
++exit 77
++
+ : ${MSGCONV=msgconv}
+ ${MSGCONV} --to-code=UTF-8 -o mm-ko.utf-8.pot "$wabs_srcdir"/mm-ko.ascii.pot
+diff --git a/gettext-tools/tests/xgettext-python-3 b/gettext-tools/tests/xgettext-python-3
+index 1e13b5793557..ee1ffee420fe 100755
+--- a/gettext-tools/tests/xgettext-python-3
++++ b/gettext-tools/tests/xgettext-python-3
+@@ -6,6 +6,8 @@
+ # Note: This test fails on Linux with musl libc versions that don't support
+ # the EUC-JP encoding in 'iconv'.
++exit 77
++
+ cat <<\EOF > xg-py-3a.py
+ #!/usr/bin/env python
+ # TRANSLATORS: Fran\8f«®ois Pinard is a hero.
+-- 
+2.39.5
+
index c704a3b6d7eb30ba25de3a2bbce2b151efb68236..e160d4839dc37d1037d04aad2d7975897c23c4c9 100644 (file)
@@ -27,6 +27,7 @@ SRC_URI += " \
            file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \
            file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \
            "
+SRC_URI:append:libc-musl = " file://0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch"
 
 inherit autotools texinfo pkgconfig ptest
 
@@ -51,6 +52,10 @@ EXTRA_OECONF:append:class-target = " \
                  gt_cv_locale_de=de_DE.ISO-8859-1 \
 "
 
+EXTRA_OECONF:append:libc-musl = "\
+                 --enable-threads=posix \
+                 gt_cv_func_printf_posix=yes \
+"
 PACKAGECONFIG ??= "glib libxml"
 PACKAGECONFIG:class-native = ""
 PACKAGECONFIG:class-nativesdk = ""
@@ -174,7 +179,7 @@ do_install_ptest() {
         sed -i -e 's|${DEBUG_PREFIX_MAP}||g' ${D}${PTEST_PATH}/tests/init-env
 }
 
-RDEPENDS:${PN}-ptest += "make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr"
+RDEPENDS:${PN}-ptest += "coreutils make xz bash gawk autoconf locale-base-de-de locale-base-fr-fr"
 RDEPENDS:${PN}-ptest:append:libc-glibc = "\
     glibc-gconv-big5 \
     glibc-charmap-big5 \