Page MenuHomePhabricator

Allow pexpect tests to work in remote testsuite runs
AcceptedPublic

Authored by friss on Oct 9 2019, 1:47 PM.

Details

Reviewers
teemperor
labath
Summary

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.

Event Timeline

friss created this revision.Oct 9 2019, 1:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 9 2019, 1:47 PM
labath accepted this revision.Oct 9 2019, 11:51 PM

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.

This revision is now accepted and ready to land.Oct 9 2019, 11:51 PM
friss added a comment.Oct 10 2019, 8:11 AM

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.