This commit adds platform selection/connection commands to the base
PExpectTest class. I doesn't look like any of the current tests are
really interesting to test remotely, but it's easy enough to get
them to work.
I don't see harm in adding this, but I am curious about what are you planning to use this for. My takeaway from all of the pexpect discussions we've had in the past was that pexpect should only be used for stuff that really, really needs an interactive terminal to work (i.e., stuff like batch mode, the "gui" command, interactive command line editing/libedit stuff, etc.). All of these seem like innately host-related stuff, and I am having trouble imagining a feature/test that requires an interactive terminal, but only works on remote targets.
I don't have any specific plans. I was going through our test suite and cleaning up the remote on-device runs. Those tests were failing because they had never been exercised in this configuration, so I took a look at what it would take to get them to work, and it was easy enough. I'm no opposed to skipping those tests if we're running with a remote platform, if we don't think they'll ever be useful in this config.