devlib
devlib copied to clipboard
devlib/utils/ssh.py: Fix set terminal window size
Ensure that the terminal window size is set to 500x200, if not long commands (prompt + command > 80 chars) will fail because the pexpect search to match the command string in order to get the result and the command is wrapped to first 80 chars.
In order to fix this scenario enables checkwinsize in the shell and use stty to set the new terminal window size.
Signed-off-by: Aníbal Limón [email protected]
Related to,
https://github.com/ARM-software/workload-automation/pull/725
@marcbonnici That code has been replaced by the paramiko connection for quite a while now, so I think we can close this PR. A similar problem probably exists in the telnet connection but I honestly don't think telnet works at all in the current state.
If we wanted to resurrect it, we would need to be able to multiplex multiple command output in the same terminal (for background command API), which is challenging. And at that rate, it may just be simpler to setup SLIP (IP over serial port) and use SSH