llvm.org GIT mirror llvm / a327ac3
lit: warn when passed invalid pathname It would previously say things like warning: input 'test/Frontend/foo.c' contained no tests and have the user pull their hair trying to figure out what's wrong with that file. This patch changes the message to the much clearer: warning: no such file or directory: 'test/Frontend/foo.c' Differential Revision: http://reviews.llvm.org/D4097 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210597 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
1 changed file(s) with 5 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
199199 # Expand '@...' form in inputs.
200200 actual_inputs = []
201201 for input in inputs:
202 if os.path.exists(input) or not input.startswith('@'):
203 actual_inputs.append(input)
204 else:
202 if input.startswith('@'):
205203 f = open(input[1:])
206204 try:
207205 for ln in f:
210208 actual_inputs.append(ln)
211209 finally:
212210 f.close()
211 elif os.path.exists(input):
212 actual_inputs.append(input)
213 else:
214 lit_config.warning('no such file or directory: %r' % input)
213215
214216 # Load the tests from the inputs.
215217 tests = []