<div dir="ltr">Sorry, I should have caught that in review.<div><br></div><div>Adam is right, the reason why this code didn't do this previously is because of the "virtual test discovery" mechanism that lets you name tests inside the "test exec root".</div>
<div><br></div><div>Hans, I think it is probably necessary to put this patch later, after the actual discovery is done.</div><div><br></div><div> - Daniel</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 16, 2014 at 11:18 AM, Adam Nemet <span dir="ltr"><<a href="mailto:anemet@apple.com" target="_blank">anemet@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hi Hans,<div><br></div><div><div><div><div>How do you run individual tests after this patch? I used to be able to this:</div><div><br></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">
<div><div><div><div>/org/llvm/build/test$ /usr/bin/python ../../utils/lit/lit.py -v MC/X86/avx512-encodings.s</div></div></div></div><div><div><div><div>-- Testing: 1 tests, 1 threads --</div></div></div></div><div><div>
<div><div>PASS: LLVM :: MC/X86/avx512-encodings.s (1 of 1)</div></div></div></div><div><div><div><div>Testing Time: 0.03s</div></div></div></div><div><div><div><div> Expected Passes : 1</div></div></div></div></blockquote>
<div><div><div><div><br></div><div>Whereas now I get:</div><div><br></div></div></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div><div><div>/org/llvm/build/test$ /usr/bin/python ../../utils/lit/lit.py -v MC/X86/avx512-encodings.s</div>
</div></div></div></div><div><div><div><div><div>lit.py: discovery.py:215: warning: no such file or directory: 'MC/X86/avx512-encodings.s'</div></div></div></div></div><div><div><div><div><div>-- Testing: 0 tests, 0 threads --</div>
</div></div></div></div><div><div><div><div><div>Testing Time: 0.01s</div></div></div></div></div><div><div><div><div><div><br></div></div></div></div></div><div><div><div><div><div>1 warning(s) in tests.</div><div><br></div>
</div></div></div></div></blockquote></div><div>It looks like that the reason is this:</div><div><br></div><div><div class="">On Jun 10, 2014, at 3:51 PM, Hans Wennborg <<a href="mailto:hans@hanshq.net" target="_blank">hans@hanshq.net</a>> wrote:<br>
</div><div><div class=""><br><blockquote type="cite">Modified: llvm/trunk/utils/lit/lit/discovery.py<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=210597&r1=210596&r2=210597&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/discovery.py?rev=210597&r1=210596&r2=210597&view=diff</a><br>
==============================================================================<br>--- llvm/trunk/utils/lit/lit/discovery.py (original)<br>+++ llvm/trunk/utils/lit/lit/discovery.py Tue Jun 10 17:51:58 2014<br>@@ -200,9 +200,7 @@ def find_tests_for_inputs(lit_config, in<br>
# Expand '@...' form in inputs.<br> actual_inputs = []<br> for input in inputs:<br>- if os.path.exists(input) or not input.startswith('@'):<br>- actual_inputs.append(input)<br>
- else:<br></blockquote><div><br></div></div><div>This used to allow the test even if the file didn’t exist under build/test which is usually not the case.</div><div class=""><br><blockquote type="cite">+ if input.startswith('@'):<br>
f = open(input[1:])<br> try:<br> for ln in f:<br>@@ -211,6 +209,10 @@ def find_tests_for_inputs(lit_config, in<br> actual_inputs.append(ln)<br> finally:<br>
f.close()<br>+ elif os.path.exists(input):<br>+ actual_inputs.append(input)<br>+ else:<br>+ lit_config.warning('no such file or directory: %r' % input)<br></blockquote>
<div><br></div></div><div>But now we fail in that case.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Adam</div><div><br></div></font></span></div></div></div></blockquote></div><br></div>