Add locales to available_features for tests.
Linux has a lot of failures caused by not having support for certain
locales. Since these come out as a lot of noise in the test results,
have lit.cfg detect the presence of the various locales used in the
tests and add them to config.available_features as locale.LOCALE_NAME.
This patch also adds REQUIRES: locale.REQUIRED_LOCALE to every test that
I saw failing in this manner. We probably need to add more for all the
tests requiring en_US.UTF-8, but we can do that on an as-needed basis.
One thing that concerns me is how many tests get skipped because of
missing locales (especially in regex/). We should make a point of
splitting up any tests that test default behavior _and_ behavior under a
given locale so that we aren't losing coverage for default behavior.
llvm-svn: 214753
diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
index 80f6e26..c46e2c0 100644
--- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
+++ b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <ios>
// template <class charT, class traits> class basic_ios
diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
index eb9262c..509b836 100644
--- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
+++ b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/move.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.fr_FR.UTF-8
+
// <ios>
// template <class charT, class traits> class basic_ios
diff --git a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
index 08b8ec4..e44f4b3 100644
--- a/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
+++ b/libcxx/test/input.output/iostreams.base/ios/basic.ios.members/swap.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <ios>
// template <class charT, class traits> class basic_ios
diff --git a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
index 2c4f22b..deb2dc7 100644
--- a/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
+++ b/libcxx/test/input.output/stream.buffers/streambuf/streambuf.members/streambuf.locales/locales.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <streambuf>
// template <class charT, class traits = char_traits<charT> >
diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg
index 4b7b470..51c1ff5 100644
--- a/libcxx/test/lit.cfg
+++ b/libcxx/test/lit.cfg
@@ -3,6 +3,7 @@
# Configuration file for the 'lit' test runner.
import errno
+import locale
import os
import platform
import re
@@ -175,6 +176,42 @@
# test_source_root: The root path where tests are located.
config.test_source_root = os.path.dirname(__file__)
+# Figure out which of the required locales we support
+locales = {
+ 'Darwin': {
+ 'en_US.UTF-8': 'en_US.UTF-8',
+ 'cs_CZ.ISO8859-2': 'cs_CZ.ISO8859-2',
+ 'fr_FR.UTF-8': 'fr_FR.UTF-8',
+ 'fr_CA.ISO8859-1': 'cs_CZ.ISO8859-1',
+ 'ru_RU.UTF-8': 'ru_RU.UTF-8',
+ 'zh_CN.UTF-8': 'zh_CN.UTF-8',
+ },
+ 'Linux': {
+ 'en_US.UTF-8': 'en_US.UTF-8',
+ 'cs_CZ.ISO8859-2': 'cs_CZ.ISO-8859-2',
+ 'fr_FR.UTF-8': 'fr_FR.UTF-8',
+ 'fr_CA.ISO8859-1': 'fr_CA.ISO-8859-1',
+ 'ru_RU.UTF-8': 'ru_RU.UTF-8',
+ 'zh_CN.UTF-8': 'zh_CN.UTF-8',
+ },
+ 'Windows': {
+ 'en_US.UTF-8': 'English_United States.1252',
+ 'cs_CZ.ISO8859-2': 'Czech_Czech Republic.1250',
+ 'fr_FR.UTF-8': 'French_France.1252',
+ 'fr_CA.ISO8859-1': 'French_Canada.1252',
+ 'ru_RU.UTF-8': 'Russian_Russia.1251',
+ 'zh_CN.UTF-8': 'Chinese_China.936',
+ },
+}
+
+for feature, loc in locales[platform.system()].items():
+ try:
+ locale.setlocale(locale.LC_ALL, loc)
+ config.available_features.add('locale.{}'.format(feature))
+ except:
+ lit_config.warning('The locale {} is not supported by your platoform. '
+ 'Some tests will be unsupported.'.format(loc))
+
# Gather various compiler parameters.
cxx_under_test = lit_config.params.get('cxx_under_test', None)
if cxx_under_test is None:
diff --git a/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp b/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
index 04d061b..98bd6dc 100644
--- a/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_CA.UTF-8
+
// <locale>
// template <class charT> class ctype_byname;
diff --git a/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp b/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
index 7165dc9..0162a6f 100644
--- a/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.ctype/locale.ctype.byname/narrow_many.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_CA.UTF-8
+
// <locale>
// template <class charT> class ctype_byname;
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
index 489068c..d7ce103 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp
@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// class money_get<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
index 737299a..44cec76 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_ru_RU.pass.cpp
@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// class money_get<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
index cc5d825..374443a 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_zh_CN.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class money_get<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
index 73b8f01..8b620bc 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_fr_FR.pass.cpp
@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// class money_put<charT, OutputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
index 705ed54..1f335e4 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_ru_RU.pass.cpp
@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// class money_put<charT, OutputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
index 8dc68c1..242701e 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.money.put/locale.money.put.members/put_long_double_zh_CN.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class money_put<charT, OutputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
index a197a18..6d23d63 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/curr_symbol.pass.cpp
@@ -9,6 +9,11 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
index b0fa38f..16d403d 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/decimal_point.pass.cpp
@@ -9,6 +9,11 @@
// <locale>
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// class moneypunct_byname<charT, International>
// charT decimal_point() const;
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
index 6bfb097..724dc1e 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/frac_digits.pass.cpp
@@ -9,6 +9,11 @@
// <locale>
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// class moneypunct_byname<charT, International>
// int frac_digits() const;
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
index 5c0bd3d..b0b9da0 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/grouping.pass.cpp
@@ -9,6 +9,11 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
index e670354..3fe9faf 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/neg_format.pass.cpp
@@ -9,6 +9,11 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
index 97fcdaa..66c8c64 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/negative_sign.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
index 3027737..7038ab1 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/pos_format.pass.cpp
@@ -9,6 +9,11 @@
//
// XFAIL: apple-darwin
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
index 3196d48..04cd173 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/positive_sign.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
index b681874..b7e16c6 100644
--- a/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.monetary/locale.moneypunct.byname/thousands_sep.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class moneypunct_byname<charT, International>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
index f9b8ef2..963974d 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
index f9fc39f..c44debf 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/date_order_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
index a5935bf..77ee5b3 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
index 4c569ca..7d0034d 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_date_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
index b9c64d7..a924cef 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
index 17ddace..009dc49 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_monthname_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
index 473bc27..536859e 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
index 973d374..36c8a8e 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_one_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
index 094a52c..8cea95d 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
index 451e87f..452a354 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_time_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
index 39a6fe9..db070be 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
index 951aee5..ac607ba 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_weekday_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
index b558f43..676e7ff 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
index 088849d..1bdb8de 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.get.byname/get_year_wide.pass.cpp
@@ -7,6 +7,11 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// class time_get_byname<charT, InputIterator>
diff --git a/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp b/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
index b6a4ed3..ff3bb82 100644
--- a/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
+++ b/libcxx/test/localization/locale.categories/category.time/locale.time.put.byname/put1.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// template <class CharT, class OutputIterator = ostreambuf_iterator<CharT> >
diff --git a/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp b/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
index 7becb8c..0617cdc 100644
--- a/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
+++ b/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/decimal_point.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// template <class charT> class numpunct_byname;
diff --git a/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp b/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
index 78bd944..b49eca4 100644
--- a/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
+++ b/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/grouping.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// template <class charT> class numpunct_byname;
diff --git a/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp b/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
index 9fdca1d..80b440a 100644
--- a/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
+++ b/libcxx/test/localization/locale.categories/facet.numpunct/locale.numpunct.byname/thousands_sep.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// template <class charT> class numpunct_byname;
diff --git a/libcxx/test/localization/locales/locale/locale.cons/assign.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/assign.pass.cpp
index c894b62..4aca354 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/assign.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/assign.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// const locale& operator=(const locale& other) throw();
diff --git a/libcxx/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
index d279bf0..8b4509b 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/char_pointer.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// explicit locale(const char* std_name);
diff --git a/libcxx/test/localization/locales/locale/locale.cons/copy.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/copy.pass.cpp
index 73ef24b..7dd7cf4 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/copy.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/copy.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.fr_FR.UTF-8
+
// <locale>
// locale(const locale& other) throw();
diff --git a/libcxx/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
index f5b959a..6bd1f63 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// locale(const locale& other, const char* std_name, category);
diff --git a/libcxx/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
index cbf6185..f7349aa 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// template <class Facet> locale(const locale& other, Facet* f);
diff --git a/libcxx/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
index 87041a2..05d87a4 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.en_US.UTF-8
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// locale(const locale& other, const locale& one, category cats);
diff --git a/libcxx/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
index 5774097..34718c8 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.ru_RU.UTF-8
+
// <locale>
// locale(const locale& other, const string& std_name, category cat);
diff --git a/libcxx/test/localization/locales/locale/locale.cons/string.pass.cpp b/libcxx/test/localization/locales/locale/locale.cons/string.pass.cpp
index 55694be..6c80df0 100644
--- a/libcxx/test/localization/locales/locale/locale.cons/string.pass.cpp
+++ b/libcxx/test/localization/locales/locale/locale.cons/string.pass.cpp
@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.ru_RU.UTF-8
+// REQUIRES: locale.zh_CN.UTF-8
+
// <locale>
// explicit locale(const string& std_name);
diff --git a/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp b/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp
index 55c7361..d63817d 100644
--- a/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.match/basic.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp b/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp
index 162a6a7..67df410 100644
--- a/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp b/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp
index 683f65b..733c16e 100644
--- a/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.match/extended.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp b/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp
index 57606c1..74c25c1 100644
--- a/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.search/awk.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp b/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp
index 56396f3..c8a5051 100644
--- a/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.search/basic.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp b/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp
index 8149157..965c29d 100644
--- a/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.search/ecma.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp b/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp
index 8240872..c181cff 100644
--- a/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp
+++ b/libcxx/test/re/re.alg/re.alg.search/extended.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
diff --git a/libcxx/test/re/re.traits/lookup_collatename.pass.cpp b/libcxx/test/re/re.traits/lookup_collatename.pass.cpp
index 055b554..049246e 100644
--- a/libcxx/test/re/re.traits/lookup_collatename.pass.cpp
+++ b/libcxx/test/re/re.traits/lookup_collatename.pass.cpp
@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class charT> struct regex_traits;
diff --git a/libcxx/test/re/re.traits/transform.pass.cpp b/libcxx/test/re/re.traits/transform.pass.cpp
index 9b9feb1..c3bce79 100644
--- a/libcxx/test/re/re.traits/transform.pass.cpp
+++ b/libcxx/test/re/re.traits/transform.pass.cpp
@@ -8,6 +8,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class charT> struct regex_traits;
diff --git a/libcxx/test/re/re.traits/transform_primary.pass.cpp b/libcxx/test/re/re.traits/transform_primary.pass.cpp
index 1e2aca6..28734d6 100644
--- a/libcxx/test/re/re.traits/transform_primary.pass.cpp
+++ b/libcxx/test/re/re.traits/transform_primary.pass.cpp
@@ -8,6 +8,8 @@
//
//===----------------------------------------------------------------------===//
+// REQUIRES: locale.cs_CZ.ISO8859-2
+
// <regex>
// template <class charT> struct regex_traits;