From f5347abac82a99332d1d0aa4dc32cc82faaac651 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 4a272475cc..c8edca2b99 100755 --- a/tools/test.py +++ b/tools/test.py @@ -683,11 +683,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 @@ -699,6 +700,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,