mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
lit: Add support for 'lit ... @foo', which reads a list of tests to run from
foo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bc1a0cf139
commit
b14c699fe0
@ -490,11 +490,27 @@ def main():
|
|||||||
isWindows = (platform.system()=='Windows'),
|
isWindows = (platform.system()=='Windows'),
|
||||||
params = userParams)
|
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.
|
# Load the tests from the inputs.
|
||||||
tests = []
|
tests = []
|
||||||
testSuiteCache = {}
|
testSuiteCache = {}
|
||||||
localConfigCache = {}
|
localConfigCache = {}
|
||||||
for input in inputs:
|
for input in actual_inputs:
|
||||||
prev = len(tests)
|
prev = len(tests)
|
||||||
tests.extend(getTests(input, litConfig,
|
tests.extend(getTests(input, litConfig,
|
||||||
testSuiteCache, localConfigCache)[1])
|
testSuiteCache, localConfigCache)[1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user