I haven’t had time to look at this in detail yet, but when I originally had this idea I thought we would use lit’s discovery mechanism to find all .py files, and then invoke them using dotest.py in single process mode with a path to a specific file.<br><br>Why do we need run lines?<br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 4, 2018 at 5:04 AM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">labath added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D45215#1056731" rel="noreferrer" target="_blank">https://reviews.llvm.org/D45215#1056731</a>, @JDevlieghere wrote:<br>
<br>
> Alright, I'm convinced this is the way to go.<br>
><br>
> - For (1) I'll see if I can get some inspiration from the visit logic in dotest.py. I guess the functionality is similar. I agree on doing this in a separate tool, especially if we want to remove functionality from dotest in the long run.<br>
<br>
<br>
I'm not aware of any code which would do the full visit. We have some code in dosep.py (`find_test_files_in_dir_tree`), but this one only does file traversal. It does not look inside the the files for classes, test methods and such.<br>
<br>
The real visiting happens inside unittest2 (loader.py). The code there seems very complicated, but I think that's because it tries to support various things we don't use, so /I hope/ that our visiting logic can be simpler.<br>
<br>
OTOH, looking at loader.py, it seems to me it may actually be possible to let it do the enumeration for us, if we stroke it the right way.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D45215" rel="noreferrer" target="_blank">https://reviews.llvm.org/D45215</a><br>
<br>
<br>
<br>
</blockquote></div>