[llvm] r211119 - lit: simplify population of the actual_inputs array

Hans Wennborg hans at hanshq.net
Tue Jun 17 11:17:46 PDT 2014


Author: hans
Date: Tue Jun 17 13:17:46 2014
New Revision: 211119

URL: http://llvm.org/viewvc/llvm-project?rev=211119&view=rev
Log:
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.

Modified:
    llvm/trunk/utils/lit/lit/discovery.py

Modified: llvm/trunk/utils/lit/lit/discovery.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=211119&r1=211118&r2=211119&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/discovery.py (original)
+++ llvm/trunk/utils/lit/lit/discovery.py Tue Jun 17 13:17:46 2014
@@ -200,9 +200,7 @@ def find_tests_for_inputs(lit_config, in
     # 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, in
                         actual_inputs.append(ln)
             finally:
                 f.close()
+        else:
+            actual_inputs.append(input)
                     
     # Load the tests from the inputs.
     tests = []





More information about the llvm-commits mailing list