Python based commands will need to be able to call WasInterrupted if they are going to do their jobs. So it would make sense to add an SBCommandInterpreter::WasInterrupted API and make sure that works. And you can already send the interrupt with DispatchInputInterrupt. So it should be pretty straight-forward to make a Python based command that runs forever, and start up another Python thread that just calls DispatchInputInterrupt. The test would just be that the command returns. That would be more direct, and wouldn't involve pexpect which has proven to be pretty fragile for anything complex.
Jim > On Sep 19, 2017, at 10:37 AM, Greg Clayton via Phabricator > <revi...@reviews.llvm.org> wrote: > > clayborg added a comment. > > We should have a test. The test would need to use pexpect or something > similar. If anyone has any pointer on how to make a test for this, please > chime in. I was thinking just a pexpect based test. > > > https://reviews.llvm.org/D37923 > > > _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits