Skip to content

Commit

Permalink
Revert "lit: warn when passed invalid pathname" (r210597)
Browse files Browse the repository at this point in the history
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211048 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
zmodem committed Jun 16, 2014
1 parent 73b142e commit baf9879
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions utils/lit/lit/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ def find_tests_for_inputs(lit_config, inputs):
# 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:
Expand All @@ -209,10 +211,6 @@ def find_tests_for_inputs(lit_config, inputs):
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 = []
Expand Down

0 comments on commit baf9879

Please sign in to comment.