<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Sep 14, 2016 at 3:51 PM Sean Callanan <<a href="mailto:scallanan@apple.com">scallanan@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" class="gmail_msg">How different is that really from<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">(lldb) script lldb.frame.FindVariable("argc").GetValue()</div><div class="gmail_msg">'1'</div><div class="gmail_msg">(lldb) script lldb.process.GetNumThreads()</div><div class="gmail_msg">1</div><div class="gmail_msg">(lldb) script lldb.process.GetThreadAtIndex(0).GetThreadID()</div><div class="gmail_msg">3514809</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">?  If it's developer-only, then this is even fairly well-documented using e.g. "script dir(lldb.process)"</div></div></div></blockquote><div><br></div>Admittedly I hadn't thought of doing that.  That said I can think of a couple of differences:<div><br></div><div>1. Writing it using script commands means you have to be familiar with the python api, somewhat raising the barrier to entry for writing new tests.  </div><div><br></div><div>2. It depends on proper behavior of the script command, which means that if the script command itself is broken, every single test will be broken.</div><div><br></div><div>3. It means that building the lldb python module is required to run tests.  Wouldn't it be awesome if there was a way to run tests even with LLDB_DISABLE_PYTHON=1?  Then script could just be a "feature" (as in, you could limit tests which use the script command to tests whose purpose is explicitly to test where the scripting system works, and for those you could just add "REQUIRES: python" at the top of the lit file.  And I imagine that not invoking python during the running of the test suite would drastically speed up its execution.</div><div><br></div><div><span style="line-height:1.5">4. You can test a LOT more things when you are able to use an api that doesn't have to be stable.</span></div></div></div>