From 42da81e6ccf0ee534173d643c13e5fc2a817ec5d Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 6 Dec 2016 18:09:11 +0100 Subject: [PATCH] test: set stdin too for pseudo-tty tests Ref: https://github.com/nodejs/node/pull/10037 Ref: https://github.com/nodejs/node/pull/10146 PR-URL: https://github.com/nodejs/node/pull/10149 Reviewed-By: Jeremiah Senkpiel Reviewed-By: James M Snell Reviewed-By: Italo A. Casas Reviewed-By: Ben Noordhuis --- tools/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/test.py b/tools/test.py index 626dd2cec6af99..838f70a17d4fec 100755 --- a/tools/test.py +++ b/tools/test.py @@ -682,11 +682,12 @@ def Execute(args, context, timeout=None, env={}, faketty=False): if faketty: import pty (out_master, fd_out) = pty.openpty() - fd_err = fd_out + fd_in = fd_err = fd_out pty_out = out_master else: (fd_out, outname) = tempfile.mkstemp() (fd_err, errname) = tempfile.mkstemp() + fd_in = 0 pty_out = None # Extend environment @@ -698,6 +699,7 @@ def Execute(args, context, timeout=None, env={}, faketty=False): context, timeout, args = args, + stdin = fd_in, stdout = fd_out, stderr = fd_err, env = env_copy,