1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[lit] Eliminate parent argument from TestingConfig.frompath(), which is effectively unused.

llvm-svn: 188032
This commit is contained in:
Daniel Dunbar 2013-08-09 00:08:46 +00:00
parent ad7660cd39
commit b3b908fad3
3 changed files with 12 additions and 6 deletions

View File

@ -73,7 +73,7 @@ class LitConfig:
if self.debug:
self.note('load_config from %r' % path)
return lit.TestingConfig.TestingConfig.frompath(
path, config.parent, self, mustExist = True, config = config)
path, config, self, mustExist = True)
def getBashPath(self):
"""getBashPath - Get the path to 'bash'"""

View File

@ -9,7 +9,14 @@ class TestingConfig:
"""
@staticmethod
def frompath(path, parent, litConfig, mustExist, config = None):
def frompath(path, config, litConfig, mustExist):
"""
frompath(path, config, litConfig, mustExist) -> TestingConfig
Load the configuration module at the provided path into the given config
object (or create a new one if None is provided) and return the config.
"""
if config is None:
# Set the environment based on the command line arguments.
environment = {
@ -38,7 +45,7 @@ class TestingConfig:
if litConfig.valgrindLeakCheck:
available_features.append('vg_leak')
config = TestingConfig(parent,
config = TestingConfig(None,
name = '<unnamed>',
suffixes = set(),
test_format = None,

View File

@ -83,9 +83,8 @@ def getLocalConfig(ts, path_in_suite, litConfig, cache):
cfgpath = os.path.join(source_path, litConfig.local_config_name)
if litConfig.debug:
litConfig.note('loading local config %r' % cfgpath)
return TestingConfig.frompath(cfgpath, parent, litConfig,
mustExist = False,
config = parent.clone(cfgpath))
return TestingConfig.frompath(cfgpath, parent.clone(cfgpath), litConfig,
mustExist = False)
def search(path_in_suite):
key = (ts, path_in_suite)