diff options
Diffstat (limited to 'llvm/utils/lit')
-rw-r--r-- | llvm/utils/lit/lit/discovery.py | 16 | ||||
-rw-r--r-- | llvm/utils/lit/tests/lit.cfg | 5 |
2 files changed, 4 insertions, 17 deletions
diff --git a/llvm/utils/lit/lit/discovery.py b/llvm/utils/lit/lit/discovery.py index 3b5d0517cff..8876dcba8f2 100644 --- a/llvm/utils/lit/lit/discovery.py +++ b/llvm/utils/lit/lit/discovery.py @@ -40,20 +40,6 @@ def getTestSuite(item, litConfig, cache): ts, relative = search(parent) return (ts, relative + (base,)) - # This is a private builtin parameter which can be used to perform - # translation of configuration paths. Specifically, this parameter - # can be set to a dictionary that the discovery process will consult - # when it finds a configuration it is about to load. If the given - # path is in the map, the value of that key is a path to the - # configuration to load instead. - config_map = litConfig.params.get('config_map') - if config_map: - cfgpath = os.path.normpath(cfgpath) - cfgpath = os.path.normcase(cfgpath) - target = config_map.get(cfgpath) - if target: - cfgpath = target - # We found a test suite, create a new config for it and load it. if litConfig.debug: litConfig.note('loading suite config %r' % cfgpath) @@ -226,7 +212,7 @@ def find_tests_for_inputs(lit_config, inputs): f.close() else: actual_inputs.append(input) - + # Load the tests from the inputs. tests = [] test_suite_cache = {} diff --git a/llvm/utils/lit/tests/lit.cfg b/llvm/utils/lit/tests/lit.cfg index f2ecaa6d417..0c98299285a 100644 --- a/llvm/utils/lit/tests/lit.cfg +++ b/llvm/utils/lit/tests/lit.cfg @@ -65,6 +65,7 @@ if sys.platform.startswith('win') or sys.platform.startswith('cygwin'): config.available_features.add('windows') # Add llvm tools directory if this config is being loaded indirectly -if config.llvm_tools_dir is not None: - path = os.path.pathsep.join((config.llvm_tools_dir, config.environment['PATH'])) +llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) +if llvm_tools_dir != None: + path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path |