[llvm] r210597 - lit: warn when passed invalid pathname
Adam Nemet
anemet at apple.com
Mon Jun 16 11:18:30 PDT 2014
Hi Hans,
How do you run individual tests after this patch? I used to be able to this:
/org/llvm/build/test$ /usr/bin/python ../../utils/lit/lit.py -v MC/X86/avx512-encodings.s
-- Testing: 1 tests, 1 threads --
PASS: LLVM :: MC/X86/avx512-encodings.s (1 of 1)
Testing Time: 0.03s
Expected Passes : 1
Whereas now I get:
/org/llvm/build/test$ /usr/bin/python ../../utils/lit/lit.py -v MC/X86/avx512-encodings.s
lit.py: discovery.py:215: warning: no such file or directory: 'MC/X86/avx512-encodings.s'
-- Testing: 0 tests, 0 threads --
Testing Time: 0.01s
1 warning(s) in tests.
It looks like that the reason is this:
On Jun 10, 2014, at 3:51 PM, Hans Wennborg <hans at hanshq.net> wrote:
> Modified: llvm/trunk/utils/lit/lit/discovery.py
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=210597&r1=210596&r2=210597&view=diff
> ==============================================================================
> --- llvm/trunk/utils/lit/lit/discovery.py (original)
> +++ llvm/trunk/utils/lit/lit/discovery.py Tue Jun 10 17:51:58 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:
This used to allow the test even if the file didn’t exist under build/test which is usually not the case.
> + if input.startswith('@'):
> f = open(input[1:])
> try:
> for ln in f:
> @@ -211,6 +209,10 @@ 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)
But now we fail in that case.
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140616/c7b3585c/attachment.html>
More information about the llvm-commits
mailing list