summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-06-17 18:17:46 +0000
committerHans Wennborg <hans@hanshq.net>2014-06-17 18:17:46 +0000
commit4a5916aca998a104f8bc0403f4dc566af6483023 (patch)
tree805698df92cf853023de2b538dffd101b504578f /utils
parent476fd7c3e9ebf96da81b1d607744679875afc5f6 (diff)
downloadllvm-4a5916aca998a104f8bc0403f4dc566af6483023.tar.gz
llvm-4a5916aca998a104f8bc0403f4dc566af6483023.tar.bz2
llvm-4a5916aca998a104f8bc0403f4dc566af6483023.tar.xz
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
Diffstat (limited to 'utils')
-rw-r--r--utils/lit/lit/discovery.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/lit/lit/discovery.py b/utils/lit/lit/discovery.py
index c3c0f283b5..876d4f31e9 100644
--- a/utils/lit/lit/discovery.py
+++ b/utils/lit/lit/discovery.py
@@ -200,9 +200,7 @@ def find_tests_for_inputs(lit_config, inputs):
# Expand '@...' form in inputs.
actual_inputs = []
for input in inputs:
- if os.path.exists(input) or not input.startswith('@'):
- actual_inputs.append(input)
- else:
+ if input.startswith('@'):
f = open(input[1:])
try:
for ln in f:
@@ -211,6 +209,8 @@ def find_tests_for_inputs(lit_config, inputs):
actual_inputs.append(ln)
finally:
f.close()
+ else:
+ actual_inputs.append(input)
# Load the tests from the inputs.
tests = []