forked from OSchip/llvm-project
[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.
This commit is contained in:
parent
2a68573a35
commit
e98c2733d2
|
@ -76,7 +76,6 @@ class Configuration(object):
|
|||
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 @@ class Configuration(object):
|
|||
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 @@ class Configuration(object):
|
|||
return LibcxxTestFormat(
|
||||
self.cxx,
|
||||
self.use_clang_verify,
|
||||
self.execute_external,
|
||||
self.executor,
|
||||
exec_env=self.exec_env)
|
||||
|
||||
|
@ -346,21 +343,6 @@ class Configuration(object):
|
|||
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)
|
||||
|
|
|
@ -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 @@ class LibcxxTestFormat(object):
|
|||
|
||||
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 @@ class LibcxxTestFormat(object):
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue