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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214753 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Albert
2014-08-04 18:44:48 +00:00
parent f0f1bca861
commit b4ed5ca01e
58 changed files with 233 additions and 0 deletions

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_CA.UTF-8
// <locale>
// template <class charT> class ctype_byname;

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_CA.UTF-8
// <locale>
// template <class charT> class ctype_byname;

View File

@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
// REQUIRES: locale.fr_FR.UTF-8
// <locale>
// class money_get<charT, InputIterator>

View File

@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
// REQUIRES: locale.ru_RU.UTF-8
// <locale>
// class money_get<charT, InputIterator>

View File

@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.zh_CN.UTF-8
// <locale>
// class money_get<charT, InputIterator>

View File

@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
// REQUIRES: locale.fr_FR.UTF-8
// <locale>
// class money_put<charT, OutputIterator>

View File

@@ -9,6 +9,8 @@
//
// XFAIL: apple-darwin
// REQUIRES: locale.ru_RU.UTF-8
// <locale>
// class money_put<charT, OutputIterator>

View File

@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.zh_CN.UTF-8
// <locale>
// class money_put<charT, OutputIterator>

View File

@@ -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>

View File

@@ -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;

View File

@@ -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;

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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> >

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
// <locale>
// template <class charT> class numpunct_byname;

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
// <locale>
// template <class charT> class numpunct_byname;

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
// <locale>
// template <class charT> class numpunct_byname;

View File

@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.ru_RU.UTF-8
// <locale>
// const locale& operator=(const locale& other) throw();

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.ru_RU.UTF-8
// REQUIRES: locale.zh_CN.UTF-8
// <locale>
// explicit locale(const char* std_name);

View File

@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.fr_FR.UTF-8
// <locale>
// locale(const locale& other) throw();

View File

@@ -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);

View File

@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.ru_RU.UTF-8
// <locale>
// template <class Facet> locale(const locale& other, Facet* f);

View File

@@ -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);

View File

@@ -7,6 +7,8 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.ru_RU.UTF-8
// <locale>
// locale(const locale& other, const string& std_name, category cat);

View File

@@ -7,6 +7,9 @@
//
//===----------------------------------------------------------------------===//
// REQUIRES: locale.ru_RU.UTF-8
// REQUIRES: locale.zh_CN.UTF-8
// <locale>
// explicit locale(const string& std_name);