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)
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()
return LibcxxTestFormat(
self.cxx,
self.use_clang_verify,
- self.execute_external,
self.executor,
exec_env=self.exec_env)
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)
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)
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,
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)