support/testing: let pexpect write stdout to log
authorRicardo Martincoski <ricardo.martincoski@gmail.com>
Thu, 29 Jun 2017 02:45:43 +0000 (23:45 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 1 Jul 2017 14:05:14 +0000 (16:05 +0200)
commite664c5f71c9614b991b13225809772eaea4a3dc5
treeecdb5a638ef4a538fbba69e084bedf3b988ae727
parent8ebc2278067eb99a25ce3098867f1f613ab50c7f
support/testing: let pexpect write stdout to log

When the parameter logfile is passed to spawn(), pexpect sends both
stdin and stdout to the logfile and it creates a double echo effect.

One way to avoid the double echo in the logfile would be to disable the
echo on the terminal just after login ("stty -echo"), but double echo of
user and password would remain.

Instead of that, send only the stdout to the logfile using the
logfile_read property.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/testing/infra/emulator.py