On Wed, Sep 14, 2016 at 3:51 PM Sean Callanan <scalla...@apple.com> wrote:
> How different is that really from > > (lldb) script lldb.frame.FindVariable("argc").GetValue() > '1' > (lldb) script lldb.process.GetNumThreads() > 1 > (lldb) script lldb.process.GetThreadAtIndex(0).GetThreadID() > 3514809 > > ? If it's developer-only, then this is even fairly well-documented using > e.g. "script dir(lldb.process)" > Admittedly I hadn't thought of doing that. That said I can think of a couple of differences: 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. 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. 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. 4. You can test a LOT more things when you are able to use an api that doesn't have to be stable.
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits