llvm.org GIT mirror llvm / 4a5916a
lit: simplify population of the actual_inputs array Add all inputs to the array, except those starting with @, which are treated as response files and expanded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211119 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
199199 # Expand '@...' form in inputs.
200200 actual_inputs = []
201201 for input in inputs:
202 if os.path.exists(input) or not input.startswith('@'):
203 actual_inputs.append(input)
204 else:
202 if input.startswith('@'):
205203 f = open(input[1:])
206204 try:
207205 for ln in f:
210208 actual_inputs.append(ln)
211209 finally:
212210 f.close()
211 else:
212 actual_inputs.append(input)
213213
214214 # Load the tests from the inputs.
215215 tests = []