<div dir="ltr">On Tue, Jun 17, 2014 at 10:48 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Mon, Jun 16, 2014 at 1:27 PM, Hans Wennborg <<a href="mailto:hans@chromium.org">hans@chromium.org</a>> wrote:<br>

> On Mon, Jun 16, 2014 at 11:20 AM, Daniel Dunbar <<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>> wrote:<br>
>> Sorry, I should have caught that in review.<br>
>><br>
>> Adam is right, the reason why this code didn't do this previously is because<br>
>> of the "virtual test discovery" mechanism that lets you name tests inside<br>
>> the "test exec root".<br>
>><br>
>> Hans, I think it is probably necessary to put this patch later, after the<br>
>> actual discovery is done.<br>
<br>
</div>I took a second look at this. It would be easy to move the check until<br>
after the discovery is done, but then my new error message is<br>
misleading:<br>
<br>
If we say "'foo/bar/' doesn't exist", that might not be the actual<br>
problem, because maybe we were also searching in ../../test, where<br>
foo/bar does exist - it just didn't contain any tests. I don't<br>
understand all the magic around test discovery, so I'm not going to<br>
pursue this further.<br>
<br>
I would like to simplify this code while I'm here though:<br>
<br>
--- a/utils/lit/lit/discovery.py<br>
+++ b/utils/lit/lit/discovery.py<br>
@@ -200,9 +200,7 @@ def find_tests_for_inputs(lit_config, inputs):<br>
<div class="">     # 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>
</div><div class="">+        if input.startswith('@'):<br>
             f = open(input[1:])<br>
             try:<br>
                 for ln in f:<br>
</div>@@ -211,6 +209,8 @@ def find_tests_for_inputs(lit_config, inputs):<br>
                         actual_inputs.append(ln)<br>
             finally:<br>
                 f.close()<br>
+        else:<br>
+            actual_inputs.append(input)<br>
<br>
I think this reflects the intent of the code better - add all files to<br>
actual_inputs, except files starting with @ which are treated as<br>
response files. (Supporting the case of test inputs start with @<br>
doesn't seem important.) What do you think?<br></blockquote><div><br></div><div>That is fine with me.</div><div><br></div><div> - Daniel</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Thanks,<br>
Hans<br>
</blockquote></div><br></div></div>