From c1a83c30e10c19cdd83277bf2e5ceca7ce6471c8 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 9 Jul 2020 13:18:24 -0400 Subject: [PATCH] [libc++] Move the stdlib Lit parameter to the DSL --- libcxx/utils/libcxx/test/config.py | 18 +----------------- libcxx/utils/libcxx/test/params.py | 4 ++++ 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index 30a59a068a7a..909708b6a74a 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -126,7 +126,7 @@ class Configuration(object): self.configure_deployment() self.configure_src_root() self.configure_obj_root() - self.configure_cxx_stdlib_under_test() + self.cxx_stdlib_under_test = self.get_lit_conf('cxx_stdlib_under_test', 'libc++') self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root) self.abi_library_root = self.get_lit_conf('abi_library_path', None) self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', self.cxx_library_root) @@ -257,22 +257,6 @@ class Configuration(object): else: self.libcxx_obj_root = self.project_obj_root - def configure_cxx_stdlib_under_test(self): - self.cxx_stdlib_under_test = self.get_lit_conf( - 'cxx_stdlib_under_test', 'libc++') - if self.cxx_stdlib_under_test not in \ - ['libc++', 'libstdc++', 'msvc', 'cxx_default']: - self.lit_config.fatal( - 'unsupported value for "cxx_stdlib_under_test": %s' - % self.cxx_stdlib_under_test) - self.config.available_features.add(self.cxx_stdlib_under_test) - if self.cxx_stdlib_under_test == 'libstdc++': - # Manually enable the experimental and filesystem tests for libstdc++ - # if the options aren't present. - # FIXME this is a hack. - if self.get_lit_conf('enable_experimental') is None: - self.config.enable_experimental = 'true' - def configure_features(self): additional_features = self.get_lit_conf('additional_features') if additional_features: diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py index 8509624071c4..bcc325dee3ed 100644 --- a/libcxx/utils/libcxx/test/params.py +++ b/libcxx/utils/libcxx/test/params.py @@ -24,6 +24,10 @@ parameters = [ feature=lambda exceptions: None if exceptions else Feature(name='no-exceptions', compileFlag='-fno-exceptions')), + Parameter(name='stdlib', choices=['libc++', 'libstdc++', 'msvc'], type=str, default='libc++', + help="The C++ Standard Library implementation being tested.", + feature=lambda stdlib: Feature(name=stdlib)), + # Parameters to enable or disable parts of the test suite Parameter(name='enable_filesystem', choices=[True, False], type=bool, default=True, help="Whether to enable tests for the C++ library.",