lit: simplify population of the actual_inputs array
authorHans Wennborg <hans@hanshq.net>
Tue, 17 Jun 2014 18:17:46 +0000 (18:17 +0000)
committerHans Wennborg <hans@hanshq.net>
Tue, 17 Jun 2014 18:17:46 +0000 (18:17 +0000)
Add all inputs to the array, except those starting with @, which
are treated as response files and expanded.

llvm-svn: 211119

llvm/utils/lit/lit/discovery.py

index c3c0f28..876d4f3 100644 (file)
@@ -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 = []