summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/libcxx/test/target_info.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/utils/libcxx/test/target_info.py b/utils/libcxx/test/target_info.py
index 9a7ae05a0..2104432f0 100644
--- a/utils/libcxx/test/target_info.py
+++ b/utils/libcxx/test/target_info.py
@@ -46,25 +46,26 @@ def test_locale(loc):
locale.setlocale(locale.LC_ALL, default_locale)
-def add_common_locales(features, lit_config):
+def add_common_locales(features, lit_config, is_windows=False):
# A list of locales needed by the test-suite.
# The list uses the canonical name for the locale used in the test-suite
# TODO: On Linux ISO8859 *may* needs to hyphenated.
locales = [
- 'en_US.UTF-8',
- 'fr_FR.UTF-8',
- 'ru_RU.UTF-8',
- 'zh_CN.UTF-8',
- 'fr_CA.ISO8859-1',
- 'cs_CZ.ISO8859-2'
+ ('en_US.UTF-8', 'English_United States.1252'),
+ ('fr_FR.UTF-8', 'French_France.1252'),
+ ('ru_RU.UTF-8', 'Russian_Russia.1251'),
+ ('zh_CN.UTF-8', 'Chinese_China.936'),
+ ('fr_CA.ISO8859-1', 'French_Canada.1252'),
+ ('cs_CZ.ISO8859-2', 'Czech_Czech Republic.1250')
]
- for loc in locales:
- if test_locale(loc):
- features.add('locale.{0}'.format(loc))
+ for loc_id, windows_loc_name in locales:
+ loc_name = windows_loc_name if is_windows else loc_id
+ if test_locale(loc_name):
+ features.add('locale.{0}'.format(loc_id))
else:
lit_config.warning('The locale {0} is not supported by '
'your platform. Some tests will be '
- 'unsupported.'.format(loc))
+ 'unsupported.'.format(loc_name))
class DarwinLocalTI(DefaultTargetInfo):
@@ -251,7 +252,8 @@ class WindowsLocalTI(DefaultTargetInfo):
super(WindowsLocalTI, self).__init__(full_config)
def add_locale_features(self, features):
- add_common_locales(features, self.full_config.lit_config)
+ add_common_locales(features, self.full_config.lit_config,
+ is_windows=True)
def use_lit_shell_default(self):
# Default to the internal shell on Windows, as bash on Windows is