summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-12 17:56:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-12 17:56:42 +0000
commit6b3b0a405e54cdcfdf3f272b6a47fce6e906129c (patch)
tree478e7cbe23501b5a528a501a52bd18755364154b
parent17158425f2a16c98b37414f94c7d552747bd8aef (diff)
downloadbcm5719-llvm-6b3b0a405e54cdcfdf3f272b6a47fce6e906129c.tar.gz
bcm5719-llvm-6b3b0a405e54cdcfdf3f272b6a47fce6e906129c.zip
lit: Add support for 'lit ... @foo', which reads a list of tests to run from
foo. llvm-svn: 103625
-rwxr-xr-xllvm/utils/lit/lit/lit.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/llvm/utils/lit/lit/lit.py b/llvm/utils/lit/lit/lit.py
index 3de1084e6aa..db0653f7966 100755
--- a/llvm/utils/lit/lit/lit.py
+++ b/llvm/utils/lit/lit/lit.py
@@ -490,11 +490,27 @@ def main():
isWindows = (platform.system()=='Windows'),
params = userParams)
+ # Expand '@...' form in inputs.
+ actual_inputs = []
+ for input in inputs:
+ if os.path.exists(input) or not input.startswith('@'):
+ actual_inputs.append(input)
+ else:
+ f = open(input[1:])
+ try:
+ for ln in f:
+ ln = ln.strip()
+ if ln:
+ actual_inputs.append(ln)
+ finally:
+ f.close()
+
+
# Load the tests from the inputs.
tests = []
testSuiteCache = {}
localConfigCache = {}
- for input in inputs:
+ for input in actual_inputs:
prev = len(tests)
tests.extend(getTests(input, litConfig,
testSuiteCache, localConfigCache)[1])
OpenPOWER on IntegriCloud