<div dir="ltr">Sure multiple run lines can be commands being executed that depend on each other, but it's very common for a test to have multiple check labels as well</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 25, 2018 at 9:19 AM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div>On Apr 25, 2018, at 9:08 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:</div><br class="m_-5133068261401128761Apple-interchange-newline"><div><div dir="ltr">But is there a reason why that is more valuable with LLDB than it is with LLVM?  In LLVM when a test fails it stops and doesn't run subsequent run lines.  So you have the same issue there.  </div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div>That's not a good analogy. Multiple RUN lines don't necessarily mean separate tests, they mean separate commands being executed that may depend on each other. As Pavel pointed out before, this would be closer to how gtests behave.</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><br></div><div>-- adrian</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div><div dir="ltr">The way this is handled in LLVM is that if you think tests are sufficiently different that they could be broken by different types of changes, you split them up into different files.<div><br></div><div>Do you feel LLDB is fundamentally different in this regard?</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 25, 2018 at 8:27 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Disregarding the added complexity I believe that being able to communicate the number of tests filed/passed inside a single file would be very valuable. For example when one test gets broken by upstream clang changes and it takes a few days to fix it properly, we don't want to loose signal on the other tests in the same file during that period. I think it's worth it.<div><br></div><div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div>-- adrian</div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><div><br><blockquote type="cite"><div>On Apr 25, 2018, at 8:13 AM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:</div><br class="m_-5133068261401128761m_-3363268229985282133Apple-interchange-newline"><div>Well let’s see what Davide and Adrian think.  I’m more of an outsider these days so consider my perspective an llvm-centric one, which would sometimes (but not always) be the best for lldb<br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 25, 2018 at 12:31 AM Pavel Labath via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">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/D46005#1077016" rel="noreferrer" target="_blank">https://reviews.llvm.org/D46005#1077016</a>, @zturner wrote:<br>
<br>
> Note that there's currently no precedent (that i'm aware of anwyay) in LLVM or any of its subprojects for splitting the running of a single file into multiple parallel jobs.  All of LLVM's other projects parallelize at file granularity, and so it's up to to the person writing tests to ensure that the file granularity matches that with which they want tests to be parallelized at.<br>
<br>
<br>
There's always gtest. Regardless of whether you consider a .cpp file or the built exectable to be a "test file", it will generally contain a number of tests. And arguably, our test suite is more similar to the gtest suite than the traditional lit (ShTest) suites (for one, it hijacks a third party unit testing library, and then tries to make it run under lit). And we run all gtest tests individually (I've often wondered what kind of performance impact that has, but they seem to be running fast enough anyway...).<br>
<br>
For what it's worth, paralelization is not my motivation here. There some tests which run disproportionately long, and this will speed them up, but that may be offset by the fact we need to start more work this way (if anyone is interested I can try to do some measurements). My main reason for doing this is so that we can have better mapping of test result states. As it stands now, we only have two possible results for a test: passed or failed. Lit has more results than that, and they roughly match the existing dotest states (the different treatment of XFAILs is the biggest difference), so it should be possible to represent them with more fidelity. However, right now it's not possible to translate them reasonably, as a "single test" can result in any number of fails/xfails/skips/... (or no results at all).<br>
<br>
> That doesn't mean it's not possible (as you've shown here), but it adds some additional complexity and I'm not sure it's worth it.<br>
<br>
It adds complexity, but not much imho. I was actually pleasantly surprised at how easy it was to pull this off. The entire implementation is 78 LOC right now. The changes to the test format will probably push it over a 100, but not by much.<br>
<br>
That said, I am not interested in forcing this onto everyone. I did it because it seemed like a nice thing to have and I was curious if it is doable (easily). However, if there's no interest for it, then I can just abandon it..<br>
<br>
<br>
<a href="https://reviews.llvm.org/D46005" rel="noreferrer" target="_blank">https://reviews.llvm.org/D46005</a><br>
<br>
<br>
<br>
</blockquote></div>
</div></blockquote></div><br></div></div></blockquote></div>
</div></blockquote></div></div></blockquote></div>