mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
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
This commit is contained in:
@@ -200,9 +200,7 @@ def find_tests_for_inputs(lit_config, inputs):
|
|||||||
# Expand '@...' form in inputs.
|
# Expand '@...' form in inputs.
|
||||||
actual_inputs = []
|
actual_inputs = []
|
||||||
for input in inputs:
|
for input in inputs:
|
||||||
if os.path.exists(input) or not input.startswith('@'):
|
if input.startswith('@'):
|
||||||
actual_inputs.append(input)
|
|
||||||
else:
|
|
||||||
f = open(input[1:])
|
f = open(input[1:])
|
||||||
try:
|
try:
|
||||||
for ln in f:
|
for ln in f:
|
||||||
@@ -211,6 +209,8 @@ def find_tests_for_inputs(lit_config, inputs):
|
|||||||
actual_inputs.append(ln)
|
actual_inputs.append(ln)
|
||||||
finally:
|
finally:
|
||||||
f.close()
|
f.close()
|
||||||
|
else:
|
||||||
|
actual_inputs.append(input)
|
||||||
|
|
||||||
# Load the tests from the inputs.
|
# Load the tests from the inputs.
|
||||||
tests = []
|
tests = []
|
||||||
|
Reference in New Issue
Block a user