[libcxx-commits] [libcxx] e98c273 - [libc++] Remove the ability to run using the internal Lit shell

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 15 12:38:19 PDT 2020


Author: Louis Dionne
Date: 2020-04-15T15:37:41-04:00
New Revision: e98c2733d2eb48b7919ca37744bbf66996efbaa1

URL: https://github.com/llvm/llvm-project/commit/e98c2733d2eb48b7919ca37744bbf66996efbaa1
DIFF: https://github.com/llvm/llvm-project/commit/e98c2733d2eb48b7919ca37744bbf66996efbaa1.diff

LOG: [libc++] Remove the ability to run using the internal Lit shell

The new format requires using an external shell, and as we transition
and we can simplify config.py as we transition to the new format. Also,
frankly, I'd be quite surprised if that setting was still working anyway
because we have several .sh.cpp tests that likely don't work in Lit's
internal shell.

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/config.py
    libcxx/utils/libcxx/test/format.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 3c18a36654f5..b9085a4cb5bb 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -76,7 +76,6 @@ def __init__(self, lit_config, config):
         self.use_system_cxx_lib = False
         self.use_clang_verify = False
         self.long_tests = None
-        self.execute_external = False
 
     def get_lit_conf(self, name, default=None):
         val = self.lit_config.params.get(name, None)
@@ -133,7 +132,6 @@ def configure(self):
         self.configure_cxx_library_root()
         self.configure_use_clang_verify()
         self.configure_use_thread_safety()
-        self.configure_execute_external()
         self.configure_ccache()
         self.configure_compile_flags()
         self.configure_link_flags()
@@ -177,7 +175,6 @@ def get_test_format(self):
         return LibcxxTestFormat(
             self.cxx,
             self.use_clang_verify,
-            self.execute_external,
             self.executor,
             exec_env=self.exec_env)
 
@@ -346,21 +343,6 @@ def configure_use_thread_safety(self):
             self.config.available_features.add('thread-safety')
             self.lit_config.note("enabling thread-safety annotations")
 
-    def configure_execute_external(self):
-        # Choose between lit's internal shell pipeline runner and a real shell.
-        # If LIT_USE_INTERNAL_SHELL is in the environment, we use that as the
-        # default value. Otherwise we ask the target_info.
-        use_lit_shell_default = os.environ.get('LIT_USE_INTERNAL_SHELL')
-        if use_lit_shell_default is not None:
-            use_lit_shell_default = use_lit_shell_default != '0'
-        else:
-            use_lit_shell_default = self.target_info.use_lit_shell_default()
-        # Check for the command line parameter using the default value if it is
-        # not present.
-        use_lit_shell = self.get_lit_bool('use_lit_shell',
-                                          use_lit_shell_default)
-        self.execute_external = not use_lit_shell
-
     def configure_ccache(self):
         use_ccache_default = os.environ.get('LIBCXX_USE_CCACHE') is not None
         use_ccache = self.get_lit_bool('use_ccache', use_ccache_default)

diff  --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py
index 0ec68e9716ad..7ad7d0a51bd0 100644
--- a/libcxx/utils/libcxx/test/format.py
+++ b/libcxx/utils/libcxx/test/format.py
@@ -35,11 +35,10 @@ class LibcxxTestFormat(object):
       FOO.sh.cpp   - A test that uses LIT's ShTest format.
     """
 
-    def __init__(self, cxx, use_verify_for_fail, execute_external,
+    def __init__(self, cxx, use_verify_for_fail,
                  executor, exec_env):
         self.cxx = copy.deepcopy(cxx)
         self.use_verify_for_fail = use_verify_for_fail
-        self.execute_external = execute_external
         self.executor = executor
         self.exec_env = dict(exec_env)
 
@@ -126,7 +125,7 @@ def _execute(self, test, lit_config):
 
         tmpDir, tmpBase = lit.TestRunner.getTempPaths(test)
         substitutions = lit.TestRunner.getDefaultSubstitutions(
-            test, tmpDir, tmpBase, normalize_slashes=self.execute_external)
+            test, tmpDir, tmpBase, normalize_slashes=True)
 
         # Apply substitutions in FILE_DEPENDENCIES markup
         data_files = lit.TestRunner.applySubstitutions(test.file_dependencies, substitutions,
@@ -172,7 +171,7 @@ def _execute(self, test, lit_config):
                 return lit.Test.UNSUPPORTED, 'ShTest format not yet supported'
             test.config.environment = self.executor.merge_environments(os.environ, self.exec_env)
             return lit.TestRunner._runShTest(test, lit_config,
-                                             self.execute_external, script,
+                                             True, script,
                                              tmpBase)
         elif is_fail_test:
             return self._evaluate_fail_test(test, test_cxx, parsers)


        


More information about the libcxx-commits mailing list