summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/icu
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/icu')
-rw-r--r--meta/recipes-support/icu/icu/0001-ICU-23120-Mask-UnicodeStringTest-TestLargeMemory-on-.patch28
-rw-r--r--meta/recipes-support/icu/icu/0001-test-Add-support-ptest.patch84
-rwxr-xr-xmeta/recipes-support/icu/icu/run-ptest13
-rw-r--r--meta/recipes-support/icu/icu_77-1.bb23
4 files changed, 148 insertions, 0 deletions
diff --git a/meta/recipes-support/icu/icu/0001-ICU-23120-Mask-UnicodeStringTest-TestLargeMemory-on-.patch b/meta/recipes-support/icu/icu/0001-ICU-23120-Mask-UnicodeStringTest-TestLargeMemory-on-.patch
new file mode 100644
index 0000000000..e2e9546679
--- /dev/null
+++ b/meta/recipes-support/icu/icu/0001-ICU-23120-Mask-UnicodeStringTest-TestLargeMemory-on-.patch
@@ -0,0 +1,28 @@
1From 4b3e6888c2aaba6465f1bc96f61b17a2513050f3 Mon Sep 17 00:00:00 2001
2From: David Seifert <soap@gentoo.org>
3Date: Sat, 21 Jun 2025 12:28:15 +0200
4Subject: [PATCH] ICU-23120 Mask UnicodeStringTest::TestLargeMemory on 32-bit
5 platforms
6
7Upstream-Status: Submitted [https://github.com/unicode-org/icu/pull/3496]
8Signed-off-by: Daisuke Yamane <yamane07ynct@gmail.com>
9---
10 test/intltest/ustrtest.cpp | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/test/intltest/ustrtest.cpp b/test/intltest/ustrtest.cpp
14index 56976b3e3d2..26225f5b5b5 100644
15--- a/test/intltest/ustrtest.cpp
16+++ b/test/intltest/ustrtest.cpp
17@@ -2353,7 +2353,7 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
18 }
19
20 void UnicodeStringTest::TestLargeMemory() {
21-#if U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED
22+#if (U_PLATFORM_IS_LINUX_BASED || U_PLATFORM_IS_DARWIN_BASED) && (UINTPTR_MAX == 0xFFFFFFFFFFFFFFFF)
23 if(quick) { return; }
24 IcuTestErrorCode status(*this, "TestLargeMemory");
25 constexpr uint32_t len = 2147483643;
26--
272.43.0
28
diff --git a/meta/recipes-support/icu/icu/0001-test-Add-support-ptest.patch b/meta/recipes-support/icu/icu/0001-test-Add-support-ptest.patch
new file mode 100644
index 0000000000..88350c0db5
--- /dev/null
+++ b/meta/recipes-support/icu/icu/0001-test-Add-support-ptest.patch
@@ -0,0 +1,84 @@
1From 783d9e0d3d7824fbca53c2c3a80e8e5e23eacc82 Mon Sep 17 00:00:00 2001
2From: Daisuke Yamane <yamane07ynct@gmail.com>
3Date: Tue, 1 Jul 2025 18:35:25 +0900
4Subject: [PATCH] test: Add support ptest
5
6Upstream-Status: Inappropriate [oe-core specific]
7
8Signed-off-by: Daisuke Yamane <yamane07ynct@gmail.com>
9---
10 test/cintltst/Makefile.in | 2 +-
11 test/intltest/Makefile.in | 2 +-
12 test/intltest/intltest.cpp | 2 +-
13 test/iotest/Makefile.in | 2 +-
14 test/letest/Makefile.in | 2 +-
15 5 files changed, 5 insertions(+), 5 deletions(-)
16
17diff --git a/test/cintltst/Makefile.in b/test/cintltst/Makefile.in
18index 552a105..9cf3071 100644
19--- a/test/cintltst/Makefile.in
20+++ b/test/cintltst/Makefile.in
21@@ -39,7 +39,7 @@ CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ct
22 ifdef QNX_TARGET
23 DEFS += -D'ICU_UNICODE_VERSION="$(UNICODE_VERSION)"' -D'ICU_VERSION="@VERSION@"' -D'ICUDATA_NAME="$(ICUDATA_PLATFORM_NAME)"' -D'U_TOPSRCDIR="/var/icu_tests"' -D'U_TOPBUILDDIR="/var/icu_tests/"'
24 else
25-DEFS += -D'ICU_UNICODE_VERSION="$(UNICODE_VERSION)"' -D'ICU_VERSION="@VERSION@"' -D'ICUDATA_NAME="$(ICUDATA_PLATFORM_NAME)"' -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
26+DEFS += -D'ICU_UNICODE_VERSION="$(UNICODE_VERSION)"' -D'ICU_VERSION="@VERSION@"' -D'ICUDATA_NAME="$(ICUDATA_PLATFORM_NAME)"' -D'U_TOPSRCDIR="$(PTEST_PATH)/"' -D'U_TOPBUILDDIR="$(PTEST_PATH)/"'
27 endif
28 LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUTOOLUTIL) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
29
30diff --git a/test/intltest/Makefile.in b/test/intltest/Makefile.in
31index 5d4a03b..ca4e4cd 100644
32--- a/test/intltest/Makefile.in
33+++ b/test/intltest/Makefile.in
34@@ -39,7 +39,7 @@ CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT= -DUNISTR_FROM_STRING_EXPLICIT=
35 ifdef QNX_TARGET
36 DEFS += -D'U_TOPSRCDIR="/var/icu_tests"' -D'U_TOPBUILDDIR="/var/icu_tests/"'
37 else
38-DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
39+DEFS += -D'U_TOPSRCDIR="$(PTEST_PATH)/"' -D'U_TOPBUILDDIR="$(PTEST_PATH)/"'
40 endif
41 LIBS = $(LIBCTESTFW) $(LIBICUI18N) $(LIBICUUC) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) $(LIB_THREAD)
42
43diff --git a/test/intltest/intltest.cpp b/test/intltest/intltest.cpp
44index 3806d0f..33829b0 100644
45--- a/test/intltest/intltest.cpp
46+++ b/test/intltest/intltest.cpp
47@@ -1713,7 +1713,7 @@ static bool fileExists(const char* fileName) {
48 * Returns the path to icu/testdata/
49 */
50 const char *IntlTest::getSharedTestData(UErrorCode& err) {
51-#define SOURCE_TARBALL_TOP U_TOPSRCDIR U_FILE_SEP_STRING ".." U_FILE_SEP_STRING
52+#define SOURCE_TARBALL_TOP U_TOPSRCDIR U_FILE_SEP_STRING
53 #define REPO_TOP SOURCE_TARBALL_TOP ".." U_FILE_SEP_STRING
54 #define FILE_NAME U_FILE_SEP_STRING "message2" U_FILE_SEP_STRING "valid-tests.json"
55 const char *srcDataDir = nullptr;
56diff --git a/test/iotest/Makefile.in b/test/iotest/Makefile.in
57index 16c510f..9eeff4b 100644
58--- a/test/iotest/Makefile.in
59+++ b/test/iotest/Makefile.in
60@@ -39,7 +39,7 @@ CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT= -DUNISTR_FROM_STRING_EXPLICIT=
61 ifdef QNX_TARGET
62 DEFS += -D'U_TOPSRCDIR="/var/icu_tests"' -D'U_TOPBUILDDIR="/var/icu_tests/"'
63 else
64-DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
65+DEFS += -D'U_TOPSRCDIR="$(PTEST_PATH)/"' -D'U_TOPBUILDDIR="$(PTEST_PATH)/"'
66 endif
67 LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUIO) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
68
69diff --git a/test/letest/Makefile.in b/test/letest/Makefile.in
70index 156c86f..555a820 100644
71--- a/test/letest/Makefile.in
72+++ b/test/letest/Makefile.in
73@@ -30,7 +30,7 @@ BUILDDIR := $(BUILDDIR:test\\cintltst/../../=)
74 BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=)
75
76 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/layoutex $(ICULE_CFLAGS) $(ICULEHB_CFLAGS)
77-DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
78+DEFS += -D'U_TOPSRCDIR="$(PTEST_PATH)/"' -D'U_TOPBUILDDIR="$(PTEST_PATH)/"'
79 LIBS = $(LIBICULX) $(LIBICUUC) $(LIBICUI18N) $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) $(ICULEHB_LIBS)
80
81 COMMONOBJECTS = SimpleFontInstance.o
82--
832.43.0
84
diff --git a/meta/recipes-support/icu/icu/run-ptest b/meta/recipes-support/icu/icu/run-ptest
new file mode 100755
index 0000000000..e5bf27a822
--- /dev/null
+++ b/meta/recipes-support/icu/icu/run-ptest
@@ -0,0 +1,13 @@
1#!/bin/sh
2
3TOPDIR=$(dirname "$(realpath $0)")
4cd ${TOPDIR}/test/tests
5TESTS=$(find . -executable -type f)
6for t in ${TESTS}; do
7 ./$t
8 if [ "$?" = "0" ]; then
9 echo "PASS: $t"
10 else
11 echo "FAIL: $t"
12 fi
13done
diff --git a/meta/recipes-support/icu/icu_77-1.bb b/meta/recipes-support/icu/icu_77-1.bb
index e655b18ad2..cd81a6c729 100644
--- a/meta/recipes-support/icu/icu_77-1.bb
+++ b/meta/recipes-support/icu/icu_77-1.bb
@@ -119,6 +119,9 @@ SRC_URI = "${BASE_SRC_URI};name=code \
119 ${DATA_SRC_URI};name=data \ 119 ${DATA_SRC_URI};name=data \
120 file://filter.json \ 120 file://filter.json \
121 file://0001-icu-Added-armeb-support.patch \ 121 file://0001-icu-Added-armeb-support.patch \
122 file://0001-ICU-23120-Mask-UnicodeStringTest-TestLargeMemory-on-.patch \
123 file://0001-test-Add-support-ptest.patch \
124 file://run-ptest \
122 " 125 "
123 126
124SRC_URI:append:class-target = "\ 127SRC_URI:append:class-target = "\
@@ -160,3 +163,23 @@ do_make_icudata() {
160} 163}
161 164
162addtask make_icudata before do_configure after do_patch do_prepare_recipe_sysroot 165addtask make_icudata before do_configure after do_patch do_prepare_recipe_sysroot
166
167inherit ptest
168RDEPENDS:${PN}-ptest += "bash"
169
170do_compile_ptest() {
171 oe_runmake -C test everything PTEST_PATH=${PTEST_PATH}
172}
173
174do_install_ptest() {
175 install -d ${D}${PTEST_PATH}/test
176 install -d ${D}${PTEST_PATH}/data
177 cp -r ${S}/test/testdata ${D}/${PTEST_PATH}/test
178 cp -r ${S}/data/unidata ${D}/${PTEST_PATH}/data/
179 cp -r ${S}/data/sprep ${D}/${PTEST_PATH}/data/
180 cp -r ${S}/../testdata ${D}/${PTEST_PATH}/
181 cp -r ${B}/test/testdata/out ${D}/${PTEST_PATH}/test/testdata
182
183 install -d ${D}${PTEST_PATH}/test/tests
184 find ${B}/test/ -type f -executable -exec cp {} ${D}${PTEST_PATH}/test/tests \;
185}