<div dir="ltr">Seems reasonable.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 11:46 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think the correct fix is to just not throw the exception, and do it the right way. unittest doesn't even use an exception for that anymore, but has some kind of method to tag the test as xfail or skip, whereas our unittest2 uses an exceptionf or the same purpose.<div><br></div><div>Basically, we need to look at the docs for unittest, and update all of our code to only use methods / classes / etc that are publicly documented.</div></div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 11, 2015 at 11:32 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Okay. Sounds like something we can work around one way or another, either by introducing the correct exception name for unittest, or introducing our own if we need to do so.</div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 11:22 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">If I remember correctly it was in the way we had implemented one of the expected fail decorators. We were manually throwing some kind of exception to indicate an xfail or a skip, and that exception doesn't exist in the upstream unittest. Basically, we were relying on an implementation detail of unittest2</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 11, 2015 at 11:20 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think we can do this, and I'd like us to do this unless it's proven to break something we're not aware of. I think you did some research on this after we discussed last, but something (maybe in the decorators) didn't just work. Was that right?</div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 11:18 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Also at some point I will probably want to kill unittest2 and move to the upstream unittest. AFAICT we only use unittest2 because it works on 2.6 and unittest doesn't. But now that we're ok with saying 2.6 is unsupported, we can in theory go to the upstream unittest.</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 11, 2015 at 11:17 AM Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Not sure I follow. Are you trying to test the execution engine itself (dotest.py, lldbtest.py, etc) or are you trying to have another alternative to running individual tests? The <div><br></div><div>if __name__ == "__main__":</div><div> unittest.main() stuff </div><div><br></div><div>was deleted deleted from all tests a few months ago as part of the package re-organization, and I thought I had general consensus at the time that that was ok to do.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 11, 2015 at 11:13 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">It just requires running the test file as a python script.<div><br></div><div>The runner is fired off like this:</div><div><div><br></div><div>if __name__ == "__main__":</div><div> unittest.main()</div></div><div><br></div><div>which is typically added to the bottom of all test files so you can call it directly.</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 11:12 AM, Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Unittest.<div><br></div><div>Comes with Python.</div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 11:07 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Presumably those tests use an entirely different, hand-rolled test running infrastructure?</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 11, 2015 at 10:52 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">One thing I want to make sure we can do is have a sane way of storing and running tests that test the test execution engine. Those are tests that should not run as part of an "lldb test run". These are tests that maintainers of the test system run to make sure we're not breaking stuff when we touch the test system.<div><br></div><div>I would be writing more of those if I had a semi-sane way of doing it. (Part of the reason I broke out the python-based timeout logic the way I did, before the major packaging changes, was so I had an obvious spot to add tests for the process runner logic).</div></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 10:03 AM, Todd Fiala <span dir="ltr"><<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I like it.</div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 9:51 AM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yea wasn't planning on doing this today, just throwing the idea out there.</div><div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 11, 2015 at 9:35 AM Todd Fiala <<a href="mailto:todd.fiala@gmail.com" target="_blank">todd.fiala@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm fine with the idea.<div><br></div><div>FWIW the test events model will likely shift a bit, as it is currently a single sink, whereas I am likely to turn it into a test event filter chain shortly here. Formatters still make sense as they'll be the things at the end of the chain.</div><div><br></div><div>Minor detail, result_formatter.py should be results_formatter.py - they are ResultsFormatter instances (plural on Results since it transforms a series of results into coherent reported output). I'll rename that at some point in the near future, but if you shift a number of things around, you can do that.</div><div><br></div><div>I'm just about done with the multi-pass running. I expect to get an opt-in version of that running end of day today or worst case on Sunday. It would be awesome if you can hold off on any significant change like that until this little bit is done as I'm sure we'll collide, particularly since this hits dosep.py pretty significantly.</div><div><br></div><div>Thanks!</div><div><br></div><div>-Todd</div></div><div class="gmail_extra"></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 1:33 AM, Pavel Labath via lldb-dev <span dir="ltr"><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sounds like a reasonable thing to do. A couple of tiny remarks:<br>
- when you do the move, you might as well rename dotest into something<br>
else, just to avoid the "which dotest should I run" type of<br>
questions...<br>
- there is nothing that makes it obvious that "engine" is actually a<br>
"test running engine", as it sits in a sibling folder. OTOH,<br>
"test_engine" might be too verbose, and messes up tab completion, so<br>
that might not be a good idea either...<br>
<br>
pl<br>
<br>
<br>
On 10 December 2015 at 23:30, Zachary Turner via lldb-dev<br>
<div><div><<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>> wrote:<br>
> Currently our folder structure looks like this:<br>
><br>
> lldbsuite<br>
> |-- test<br>
> |-- dotest.py<br>
> |-- dosep.py<br>
> |-- lldbtest.py<br>
> |-- ...<br>
> |-- functionalities<br>
> |-- lang<br>
> |-- expression_command<br>
> |-- ...<br>
> etc<br>
><br>
> I've been thinking about organizing it like this instead:<br>
><br>
> lldbsuite<br>
> |-- test<br>
> |-- functionalities<br>
> |-- lang<br>
> |-- expression_command<br>
> |-- ...<br>
> |-- engine<br>
> |-- dotest.py<br>
> |-- dosep.py<br>
> |-- lldbtest.py<br>
> |-- ...<br>
><br>
> Anybody have any thoughts on this? Good idea or bad idea? The main reason<br>
> I want to do this is because as we start breaking up some of the code, it<br>
> makes sense to start having some subpackages under the `engine` folder (or<br>
> the `test` folder in our current world). For example, Todd and I have<br>
> discussed the idea of putting formatter related stuff under a `formatters`<br>
> subpackage. In the current world, there's no way to differentiate between<br>
> folders which contain tests and folders which contain test infrastructure,<br>
> so when we walk the directory tree looking for tests we end up walking a<br>
> bunch of directories that are used for test infrastructure code and not<br>
> actual tests. So I like the logical separation this provides -- having the<br>
> tests themselves all under a single subpackage.<br>
><br>
> Thoughts?<br>
><br>
</div></div>> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
><br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">-Todd</div></div>
</div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr">-Todd</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">-Todd</div></div>
</div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span><font color="#888888">-- <br><div><div dir="ltr">-Todd</div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">-Todd</div></div>
</div></blockquote></div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">-Todd</div></div>
</div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div><div class="gmail_extra">-- <br><div><div dir="ltr">-Todd</div></div>
</div></blockquote></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">-Todd</div></div>
</div>