diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index 92833ceca567e7..c31a47fb4f5d01 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -355,8 +355,6 @@ def configure_features(self): self.config.available_features.add(f.strip()) self.target_info.add_locale_features(self.config.available_features) - target_platform = self.target_info.platform() - # Write an "available feature" that combines the triple when # use_system_cxx_lib is enabled. This is so that we can easily write # XFAIL markers for tests that are known to fail with versions of @@ -379,8 +377,8 @@ def configure_features(self): self.config.available_features.add('availability=%s' % name) self.config.available_features.add('availability=%s%s' % (name, version)) - # Insert the platform name into the available features as a lower case. - self.config.available_features.add(target_platform) + # Insert the platform name and version into the available features. + self.target_info.add_platform_features(self.config.available_features) # Simulator testing can take a really long time for some of these tests # so add a feature check so we can REQUIRES: long_tests in them diff --git a/libcxx/utils/libcxx/test/target_info.py b/libcxx/utils/libcxx/test/target_info.py index 00af3b8a56e58e..caa161ec93be82 100644 --- a/libcxx/utils/libcxx/test/target_info.py +++ b/libcxx/utils/libcxx/test/target_info.py @@ -40,6 +40,9 @@ def configure_env(self, env): pass def allow_cxxabi_link(self): return True def use_lit_shell_default(self): return False + def add_platform_features(self, features): + features.add(self.platform()) + def add_path(self, dest_env, new_path): if not new_path: return @@ -229,6 +232,10 @@ def platform_ver(self): def add_locale_features(self, features): self.add_common_locales(features) + + def add_platform_features(self, features): + super(LinuxLocalTI, self).add_platform_features(features) + # Some linux distributions have different locale data than others. # Insert the distributions name and name-version into the available # features to allow tests to XFAIL on them.