Skip to content

Commit

Permalink
[lit] Eliminate parent argument from TestingConfig.frompath(), which …
Browse files Browse the repository at this point in the history
…is effectively unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188032 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ddunbar committed Aug 9, 2013
1 parent f5539a3 commit b3c0c58
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion utils/lit/lit/LitConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def load_config(self, config, path):
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'"""
Expand Down
11 changes: 9 additions & 2 deletions utils/lit/lit/TestingConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -38,7 +45,7 @@ def frompath(path, parent, litConfig, mustExist, config = None):
if litConfig.valgrindLeakCheck:
available_features.append('vg_leak')

config = TestingConfig(parent,
config = TestingConfig(None,
name = '<unnamed>',
suffixes = set(),
test_format = None,
Expand Down
5 changes: 2 additions & 3 deletions utils/lit/lit/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,8 @@ def search1(path_in_suite):
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)
Expand Down

0 comments on commit b3c0c58

Please sign in to comment.