[llvm] r211048 - Revert "lit: warn when passed invalid pathname" (r210597)

Hans Wennborg hans at hanshq.net
Mon Jun 16 13:18:41 PDT 2014


Author: hans
Date: Mon Jun 16 15:18:41 2014
New Revision: 211048

URL: http://llvm.org/viewvc/llvm-project?rev=211048&view=rev
Log:
Revert "lit: warn when passed invalid pathname" (r210597)

It was pointed out that this breaks the "virtual test discovery"
mechanism, which allows for narming tests in the test exec root.

Reverting until I can figure out how to fix this.

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=211048&r1=211047&r2=211048&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/discovery.py (original)
+++ llvm/trunk/utils/lit/lit/discovery.py Mon Jun 16 15:18:41 2014
@@ -200,7 +200,9 @@ def find_tests_for_inputs(lit_config, in
     # Expand '@...' form in inputs.
     actual_inputs = []
     for input in inputs:
-        if input.startswith('@'):
+        if os.path.exists(input) or not input.startswith('@'):
+            actual_inputs.append(input)
+        else:
             f = open(input[1:])
             try:
                 for ln in f:
@@ -209,10 +211,6 @@ def find_tests_for_inputs(lit_config, in
                         actual_inputs.append(ln)
             finally:
                 f.close()
-        elif os.path.exists(input):
-            actual_inputs.append(input)
-        else:
-            lit_config.warning('no such file or directory: %r' % input)
                     
     # Load the tests from the inputs.
     tests = []





More information about the llvm-commits mailing list