Skip to content

Commit 8c91b2e

Browse files
authored
Update configs to define ICU78 C++ executor and datasets (#535)
* Update configs to define ICU78 C++ executor and datasets * Update C++ executor and testgen/test data for ICU 78 (CLDR 48/Unicode 17)
1 parent 8f0aacb commit 8c91b2e

35 files changed

+457733
-27
lines changed

README.md

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -532,31 +532,40 @@ These are usually the first changes to be made because ICU4C includes updates to
532532
locale data, and test data for many components.
533533

534534
1. Test Driver:
535-
* Add new ICU version data in several places in testdriver/datasets.py
536-
537-
2. testgen:
538-
* Add a new directory for the icu version under testgen, e.g., icu76
539-
540-
* In this directory, copy test data from sources including icu4c/source. These
541-
files include collation tests, number format data, and others.
542-
543-
!!! TODO: Add details on the sources.
544-
545-
* Add new CLDR test data generated from CLDR sources (!!! details !!!)
546-
547-
3. schema: Add any new parameters in test data sources to test schema files.
548-
549-
4. Add a function in setup.sh to download the new ICU4C release.
550-
551-
5. Update run_config.json to reference new versions of executors and tests to run
552-
553-
### NodeJS and some data updates
554-
555-
NodeJS is usually updated several weeks after an ICU public release. Check on
556-
the site [Node.js Releases](https://nodejs.org/en/about/previous-releases) for
557-
the latest versions of NodeJS. Under each entry, the "changelog" will indicate
558-
any updates to icu, e.g., [Version 23.3.0 on 2024-11-20]
559-
(https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V23.md#23.3.0) which includes ICU76.1.
535+
* Add new ICU version data in several places in testdriver/datasets.py
536+
1. testgen:
537+
* Add a new directory for the icu version under testgen, e.g., icu76
538+
* In this directory, copy test data from sources including icu4c/source. These
539+
files include collation tests, number format data, and others.
540+
* `test/testdata/CollationTest_NON_IGNORABLE_SHORT.txt`
541+
* `test/testdata/CollationTest_SHIFTED_SHORT.txt`
542+
* `test/testdata/collationtest.txt`
543+
* `test/testdata/dcfmtest.txt`
544+
* `test/testdata/numberformattestspecification.txt`
545+
* `test/testdata/numberpermutationtest.txt`
546+
* Add new CLDR test data generated from CLDR sources
547+
* `common/testData/localeIdentifiers/likelySubtags.txt`
548+
* `common/testData/localeIdentifiers/localeDisplayName.txt`
549+
* `common/supplemental/ordinals.xml`
550+
* `common/supplemental/pluralRanges.xml`
551+
* `common/supplemental/plurals.xml`
552+
* `common/testData/datetime/datetime.json`
553+
* Create `message_fmt2` test files
554+
* Create subdir `message_fmt2`
555+
* Copy the Readme file from `icu76/README.md` (or modify)
556+
* Copy the test files from the MessageFormat 2 repo as described by the Readme into a subdirectory within `message_fmt2` called `message-format-wg-tests`
557+
1. schema: Add any new parameters in test data sources to test schema files.
558+
1. Add a function in setup.sh to download the new ICU4C release.
559+
1. Update run_config.json to reference new versions of executors and tests to run
560+
1. NodeJS and some data updates
561+
* Ex: edit in `relativedatetime_fmt.py` the variable (potentially local to some function) called `icu_nvm_versions` that defines the version of NodeJS being used for the ICU version (version of data).
562+
The exact version of NodeJS that has been released with the version of ICU can be found on the [NodeJS version pages](https://nodejs.org/en/about/previous-releases). \
563+
\
564+
NodeJS is usually updated several weeks after an ICU public release. Check on
565+
the site [NodeJS Releases](https://nodejs.org/en/about/previous-releases) for
566+
the latest versions of NodeJS. Under each entry, the "changelog" will indicate
567+
any updates to icu, e.g., [Version 23.3.0 on 2024-11-20]
568+
(https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V23.md#23.3.0) which includes ICU76.1.
560569

561570
#### Add references in testdriver/datasets.py
562571

run_config.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,30 @@
2323
"per_execution": 10000
2424
}
2525
},
26+
{
27+
"prereq": {
28+
"name": "Get ICU4C 78",
29+
"version": "78.1",
30+
"command": "bash ../executors/cpp/set_icu4c_binary.sh ../gh-cache/icu4c-78.1-Ubuntu22.04-x64.tgz"
31+
},
32+
"run": {
33+
"icu_version": "icu78",
34+
"exec": "cpp",
35+
"test_type": [
36+
"collation",
37+
"datetime_fmt",
38+
"lang_names",
39+
"likely_subtags",
40+
"list_fmt",
41+
"message_fmt2",
42+
"number_fmt",
43+
"plural_rules",
44+
"rdt_fmt",
45+
"segmenter"
46+
],
47+
"per_execution": 10000
48+
}
49+
},
2650
{
2751
"prereq": {
2852
"name": "Get ICU4C 76",

schema/schema_validator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,9 @@ def main(args):
456456
schema_validator.test_data_base = os.path.split(base_folders[0])[0]
457457
schema_validator.test_output_base = os.path.split(os.path.split(result_folders[0])[0])[0]
458458
schema_validator.icu_versions = ['icu71', 'icu72', 'icu73', 'icu74', 'icu75',
459-
'icu76']
459+
'icu76',
460+
'icu77', 'icu78'
461+
]
460462
schema_validator.executors = ['node', 'rust', 'dart_web', 'dart_native', 'icu4j']
461463

462464
logger.info('Checking test outputs')

setup.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ function download_77_1() {
9494
fi
9595
}
9696

97+
function download_78_1() {
98+
if [[ ! -f icu4c-78.1-Ubuntu22.04-x64.tgz ]]
99+
then
100+
wget https://github.com/unicode-org/icu/releases/download/release-78.1/icu4c-78.1-Ubuntu22.04-x64.tgz
101+
fi
102+
}
103+
97104
pushd gh-cache
98105

99106
download_71_1
@@ -104,5 +111,6 @@ function download_77_1() {
104111
download_75_1
105112
download_76_1
106113
download_77_1
114+
download_78_1
107115

108116
popd

testdriver/datasets.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class ICUVersion(Enum):
5252
ICU75 = "75"
5353
ICU76 = "76"
5454
ICU77 = "77"
55+
ICU78 = "78"
5556

5657
# TODO: Consider adding a trunk version for testing ICU / CLDR before
5758
# a complete release.
@@ -78,6 +79,7 @@ class CLDRVersion(Enum):
7879
CLDR45 = "45"
7980
CLDR46 = "46"
8081
CLDR47 = "47"
82+
CLDR48 = "48"
8183

8284
def latestCldrVersion():
8385
return CLDRVersion.CLDR43 # TODO: Fix this
@@ -99,6 +101,7 @@ def resolveCldr(text):
99101
CLDRVersion.CLDR45: [ICUVersion.ICU75],
100102
CLDRVersion.CLDR46: [ICUVersion.ICU76],
101103
CLDRVersion.CLDR47: [ICUVersion.ICU77],
104+
CLDRVersion.CLDR48: [ICUVersion.ICU78],
102105
}
103106

104107
# TODO: Can this be added to a configuration file?
@@ -437,6 +440,12 @@ def has(self, exec):
437440
CLDRVersion.CLDR47, versionICU=ICUVersion.ICU77,
438441
env={'LD_LIBRARY_PATH': '/tmp/icu/icu/usr/local/lib', 'PATH': '/tmp/icu77/bin'})
439442

443+
allExecutors.addSystem(
444+
system, CppVersion.Cpp,
445+
'../executors/cpp/executor',
446+
CLDRVersion.CLDR48, versionICU=ICUVersion.ICU78,
447+
env={'LD_LIBRARY_PATH': '/tmp/icu/icu/usr/local/lib', 'PATH': '/tmp/icu78/bin'})
448+
440449
system = 'newLanguage'
441450
allExecutors.addSystem(system, '0.1.0',
442451
'/bin/newExecutor',

testgen/generators/relativedatetime_fmt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ class RelativeDateTimeFmtGenerator(DataGenerator):
1212
json_verify = {"test_type": "rdt_fmt"}
1313

1414
def process_test_data(self):
15-
# Use NOde JS to create the .json files
15+
# Use Node JS to create the .json files
1616
icu_nvm_versions = {
17+
'icu78': '25.2.1',
1718
'icu77': '24.0.0',
1819
'icu76': '23.3.0',
1920
'icu75': '22.9.0',
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# MessageFormat 2 tests
2+
3+
The tests within the `message-format-wg-tests/` directory were copied from https://github.com/unicode-org/message-format-wg
4+
5+
```sh
6+
curl -L https://github.com/unicode-org/message-format-wg/tarball/main | tar -xz \
7+
&& mv ./unicode-org-message-format-wg-*/test/tests ./message-format-wg-tests \
8+
&& rm -rf ./unicode-org-message-format-wg-*
9+
```

0 commit comments

Comments
 (0)