diff options
author | Andrew Trick <atrick@apple.com> | 2012-02-06 23:34:52 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-02-06 23:34:52 +0000 |
commit | d0b3da1ea266774f97c63b5ec163de964c5711bf (patch) | |
tree | f671b652e94532c40d3ac04e480e4a8bc47323f7 /utils | |
parent | 25600cf50df79a6e7f8365a3ca7e940592e8ca74 (diff) | |
download | external_llvm-d0b3da1ea266774f97c63b5ec163de964c5711bf.zip external_llvm-d0b3da1ea266774f97c63b5ec163de964c5711bf.tar.gz external_llvm-d0b3da1ea266774f97c63b5ec163de964c5711bf.tar.bz2 |
This is a small patch with a couple of improvements for running lit with --debug:
1. Added a status note when a config file is loaded directly with load_config. This helps notice loads of lit.cfg from lit.site.cfg
2. Added a status note on the result of a config load. Previously, it was just notifying that it tries to load a config file. Now it will also say whether the load succeeded or the file wasn't found
The two changes give better visibility into which config files were actually loaded by lit. The effect is only on --debug runs.
Patch by Eli Bendersky!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149932 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/LitConfig.py | 2 | ||||
-rw-r--r-- | utils/lit/lit/TestingConfig.py | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/utils/lit/lit/LitConfig.py b/utils/lit/lit/LitConfig.py index 2cc2781..c71c0cc 100644 --- a/utils/lit/lit/LitConfig.py +++ b/utils/lit/lit/LitConfig.py @@ -61,6 +61,8 @@ class LitConfig: """load_config(config, path) - Load a config object from an alternate path.""" from TestingConfig import TestingConfig + if self.debug: + self.note('load_config from %r' % path) return TestingConfig.frompath(path, config.parent, self, mustExist = True, config = config) diff --git a/utils/lit/lit/TestingConfig.py b/utils/lit/lit/TestingConfig.py index fe05109..7f511d1 100644 --- a/utils/lit/lit/TestingConfig.py +++ b/utils/lit/lit/TestingConfig.py @@ -50,14 +50,19 @@ class TestingConfig: cfg_globals['__file__'] = path try: exec f in cfg_globals + if litConfig.debug: + litConfig.note('... loaded config %r' % path) except SystemExit,status: # We allow normal system exit inside a config file to just # return control without error. if status.args: raise f.close() - elif mustExist: - litConfig.fatal('unable to load config from %r ' % path) + else: + if mustExist: + litConfig.fatal('unable to load config from %r ' % path) + elif litConfig.debug: + litConfig.note('... config not found - %r' %path) config.finish(litConfig) return config |