New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a suitable pexpect module for Windows #22648
Comments
New pyexpect version is working on Windows as well. I have tested it on Python 3.5.1 and it was working well (expect including more advanced regexp with capture groups, sendline, timeouts). |
This looks very promising. One thing that concerns me is this:
The best possible scenario is that we're not using either of these methods. I'm 99% sure we are using The second best scenario is that all uses of We will also have to decide whether we want to support multiple pexpect versions. If 4.0 is the minimum required version for Windows, it might be worth asking other platform owners if they are ok with requiring pexpect 4.0 for their platforms as well. If it is ok, this could simplify some of the logic in the test suite and we won't have to worry about someone using one version of pexpect breaking someone that uses a different version. I CC'ed the OSX platform owner and the Android platform owner to see if they have any concerns about bumping the required pexpect version. I'm looking forward to one day seeing the pexpect tests working on Windows. |
I believe it makes sense to bump up pexpect version for every platform to 4.0. |
It looks like LLDB carries its own version of pexpect (under third_party/Python/module/pexpect-2.4). So replacing it with 4.0 shouldn't be a problem? What is a problem, though, is that LLDB is one of those programs that alter behavior depending on whether stdio is attached to a tty. I tried replacing pexpect.spawn with pexpect.popen_spawn.PopenSpawn (after upgrading pexpect), but that doesn't work because LLDB won't output the "(lldb)" prompt when stdout is a pipe. |
mentioned in issue #24826 |
…T_TEST_REQUIREMENTS See #22648 for why we don't use it on Windows. Any pexpect tests are skipped there.
I tried switching to PopenSpawn for all the tests that don't need interaction or to set terminal width. By the time you do that, you get 1 maybe 2 new tests running on Windows (once you port the example source too). So I don't think pursuing that direction right now is worth it (this issue itself is still valid though, ideally we'd have parity across platforms). Of the tests marked with llvm.org/pr22274, most are benchmarks and then there were 4 other tests I had to mark as interactive (and therefore not going to run on Windows at all). |
Extended Description
For example, maybe this will work. https://gist.github.com/anthonyeden/8488763
If this doesn't work, maybe we can find another, or write our own.
Until then, many tests are XFAILed on Windows.
The text was updated successfully, but these errors were encountered: