[Lldb-commits] [PATCH] D42280: Wrap all references to build artifacts in the LLDB testsuite in TestBase::getBuildArtifact()

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 22 03:28:56 PST 2018


labath added a comment.

In https://reviews.llvm.org/D42280#982229, @jingham wrote:

> I didn't intend to block this patch, just to point out that this was really work you shouldn't have had to do, and that as we touch these files we should clean them up so next time we don't have to.  It will also make the test files easier to read.


While we're on that topic, I would actually propose going one step further than `lldbutil.run_to_source_breakpoint`. I would propose creating a new test class (StandardLaunchTestCase ?) . This class would assume a certain executable name (a.out),  a certain source file name (main.cpp, but this can be taken from a class property, so it can be overriden to main.mm for objc tests) and a certain breakpoint string.

That way, it can do the "build, set breakpoint, launch, validate stop reason" dance without any user input in the setUp() method, and the test can start with the process primed and ready and just focus on the thing it's testing


Repository:
  rL LLVM

https://reviews.llvm.org/D42280





More information about the lldb-commits mailing list