<div dir="ltr"><div>Thanks Jim, I'll definitely use that as a template next time!</div><div><br></div>Ah, I think I found the problem with the test. The makefile was in the patch but wasn't committed. Trying that out now.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 12, 2016 at 5:45 PM, Jim Ingham <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On May 12, 2016, at 2:25 PM, Cameron <<a href="mailto:cameron@moodycamel.com">cameron@moodycamel.com</a>> wrote:<br>
><br>
> Sorry to break the build! Apparently 'make clean' isn't executing cleanly during the build step of the test, but I haven't the faintest idea why. It builds/runs fine locally for me (then again, I'm on Windows). The makefile is dead simple, and is identical to that of some other tests. Has anyone seen something like this before?<br>
><br>
> Ah, I would have written a test using the APIs if I knew. I didn't see any other similar tests that set up LLDB from scratch without going through the command line. For reference, can you point me to one of these tests I can use as an example for the next time?<br>
<br>
</span>expression_command/fixits/TestFixIts.py is one. It makes a target, runs it hits breakpoints and does some other stuff. Most of the Python API tests start by creating the target in Python - whereas the command-line tests tend to use the file command. So you can find lots of examples by searching for the string "self.dbg.CreateTarget" in all the .py files.<br>
<span class="HOEnZb"><font color="#888888"><br>
Jim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
><br>
> On Thu, May 12, 2016 at 5:17 PM, Jim Ingham <<a href="mailto:jingham@apple.com">jingham@apple.com</a>> wrote:<br>
> Note that while adding a "expr --allow-jit" flag to control this was great, there already was an SBExpressionOptions option and the appropriate flags available for this, so it was testable. I was just checking because there really shouldn't be anything we can do from a command that we can't do from the SB API's, but in this case the thing was already in the expression options.<br>
><br>
> We do prefer not to write tests with the command line when you can do it with the Python API's. In our experience, command line tests have tended to be more fragile. It's not necessary to change the test, there are plenty of other command line tests lying around. Just for future reference...<br>
><br>
> Jim<br>
><br>
> > On May 9, 2016, at 1:01 PM, Sean Callanan via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a>> wrote:<br>
> ><br>
> > spyffe accepted this revision.<br>
> > spyffe added a comment.<br>
> > This revision is now accepted and ready to land.<br>
> ><br>
> > This patch is fine. I especially appreciate the time you took making the IRInterpreter properly testable. I will use this myself.<br>
> ><br>
> ><br>
> > ================<br>
> > Comment at: source/Commands/CommandObjectExpression.cpp:67<br>
> > @@ -67,1 +66,3 @@<br>
> > + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "top-level", 'p', OptionParser::eNoArgument , NULL, NULL, 0, eArgTypeNone, "Interpret the expression as top-level definitions rather than code to be immediately executed."},<br>
> > + { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "allow-jit", 'j', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeBoolean, "Controls whether the expression can fall back to being JITted if it's not supported by the interpreter (defaults to true)."}<br>
> > };<br>
> > ----------------<br>
> > This is a great feature which I will use in test cases.<br>
> ><br>
> > ================<br>
> > Comment at: source/Expression/IRInterpreter.cpp:1102<br>
> > @@ -1058,1 +1101,3 @@<br>
> > + }<br>
> > + break;<br>
> > case Instruction::GetElementPtr:<br>
> > ----------------<br>
> > Looks all right to me. Thank you!<br>
> ><br>
> ><br>
> > <a href="http://reviews.llvm.org/D19124" rel="noreferrer" target="_blank">http://reviews.llvm.org/D19124</a><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > lldb-commits mailing list<br>
> > <a href="mailto:lldb-commits@lists.llvm.org">lldb-commits@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>