[lldb-dev] Using FileCheck in lldb inline tests

Vedant Kumar via lldb-dev lldb-dev at lists.llvm.org
Wed Aug 15 11:27:12 PDT 2018



> On Aug 14, 2018, at 6:07 PM, Zachary Turner <zturner at google.com> wrote:
> 
> 
> 
> On Tue, Aug 14, 2018 at 5:56 PM Vedant Kumar <vsk at apple.com <mailto:vsk at apple.com>> wrote:
> 
> 
>> On Aug 14, 2018, at 5:34 PM, Zachary Turner <zturner at google.com <mailto:zturner at google.com>> wrote:
>> 
>> I’ve thought about this in the past but the conclusion I came to is that lldbinline tests are actually just filecheck tests in disguise. Why do we need both? I’d rather delete the lldbinline infrastructure entirely and make a new lit TestFormat that basically does what lldbinline already does 
> 
> An inline test does more than simply pattern-matching input. It builds a program, sets breakpoints, etc. I'd rather make this existing infrastructure easier to use than come up with something new.
> 
> vedant
> 
> Right, but only one specific type of lit test  depends on pattern matching, and those are the SHTest format tests.  You can make an arbitrary test format, including one that builds programs, set breakpoints etc.  the format and structure of an lldbinline test need not even change at all (except that I think we could eliminate the .py file).  The lldbinline tests are about as close to a drop in fit for lit as we can get, the only thing that needs to happen is the code in lldbinline.py needs to move to something called InlineTestFormat.py and then be hooked into lit

Creating a new lit test format compatible with inline tests sounds like a nice follow-up step. The immediate problem I'm trying to address is that it's too cumbersome to write the tests I need without FileCheck-like checks in inline tests. I think introducing this functionality is a necessary prerequisite.

vedant

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20180815/0a0034c5/attachment.html>


More information about the lldb-dev mailing list